IGOS Nusantara dan server web CustomLogs: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
(←Membuat halaman berisi 'Konfigurasi CustomLog.conf # Isi berkas: /etc/httpd/conf.d/CustomLog.conf LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogForma…')
 
Baris 1: Baris 1:
 
Konfigurasi CustomLog.conf  
 
Konfigurasi CustomLog.conf  
 +
 +
* Buat CustomLog.conf
  
 
  # Isi berkas: /etc/httpd/conf.d/CustomLog.conf  
 
  # Isi berkas: /etc/httpd/conf.d/CustomLog.conf  
Baris 9: Baris 11:
 
   
 
   
 
  SetEnvIfNoCase X-Forwarded-For "." from_proxy=1:
 
  SetEnvIfNoCase X-Forwarded-For "." from_proxy=1:
 +
 +
 +
* Tambahkan entri di httpd.conf
 +
 +
<VirtualHost *:80>
 +
    ServerAdmin info@domainku.com
 +
    DocumentRoot /home/domainku/public_html/
 +
    ServerName domainku.com
 +
    ServerAlias www.domainku.com
 +
    ErrorLog logs/domainku-error_log
 +
    CustomLog logs/domainku-access_log combined env=!from_proxy
 +
    CustomLog logs/domainku-access_log combined_forwarded env=from_proxy
 +
</VirtualHost>

Revisi per 12 Januari 2010 11.45

Konfigurasi CustomLog.conf

  • Buat CustomLog.conf
# Isi berkas: /etc/httpd/conf.d/CustomLog.conf 
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_forwarded
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

SetEnvIfNoCase X-Forwarded-For "." from_proxy=1:


  • Tambahkan entri di httpd.conf
<VirtualHost *:80>
   ServerAdmin info@domainku.com
   DocumentRoot /home/domainku/public_html/
   ServerName domainku.com
   ServerAlias www.domainku.com
   ErrorLog logs/domainku-error_log
   CustomLog logs/domainku-access_log combined env=!from_proxy
   CustomLog logs/domainku-access_log combined_forwarded env=from_proxy
</VirtualHost>