PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Server-Hostname in Access.log?



Tomato
14.02.08, 15:59
Hallo. Ich habe mehrere virtuelle Hosts, die in die gleiche access.log loggen. Als Logformat nutze ich den Apache2-Standard "CustomLog". Nun wird im Log allerdings nur der Pfad relativ zum root abgelegt:


66.249.72.101 - - [14/Feb/2008:16:57:19 +0100] "GET /index.php/page/3/?g2_itemId=1686 HTTP/1.1" 200 30683 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

Nun möchte ich aber - um die unterschiedlichen Domains besser Unterscheiden zu können die URL ebenfalls speichern, also im Prinzip sowas:

66.249.72.101 - - [14/Feb/2008:16:57:19 +0100] "GET www.stammtischphilosoph.com/index.php/page/3/?g2_itemId=1686 HTTP/1.1" 200 30683 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"


Wie kriege ich das hin?

marce
14.02.08, 16:06
http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats

Aqualung
14.02.08, 16:07
Such Dir hier


http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats

was aus.



Some commonly used log format strings are:

Common Log Format (CLF)
"%h %l %u %t \"%r\" %>s %b"
Common Log Format with Virtual Host
"%v %h %l %u %t \"%r\" %>s %b"
NCSA extended/combined log format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
Referer log format
"%{Referer}i -> %U"
Agent (Browser) log format
"%{User-agent}i"



Gruß Aqualung