IGOS Nusantara dan server web CustomLogs: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
Baris 13: Baris 13:
  
  
* Tambahkan entri di httpd.conf
+
* Tambahkan entri di /etc/httpd/conf/httpd.conf
  
 +
# Isi berkas: /etc/httpd/conf/httpd.conf
 +
 +
...
 +
...
 +
...
 
  <VirtualHost *:80>
 
  <VirtualHost *:80>
 
     ServerAdmin info@domainku.com
 
     ServerAdmin info@domainku.com

Revisi per 12 Januari 2010 11.48

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 /etc/httpd/conf/httpd.conf
# Isi berkas: /etc/httpd/conf/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>