Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show subdomains in apache logs

I would like the subdomains to show up in the my apache logs.

At the moment a request for:

abc.website.com/doc1.html
def.website.com/doc2.html

show up in my logs only as:

/doc1.html
/doc2.html

I was looking for an option at: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats

but i found nothing related to the subdomains.

(Pleas excuse my English.)

like image 858
user982809 Avatar asked Oct 20 '11 13:10

user982809


1 Answers

Put a %V in your LogFormat line, for example:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %V"
like image 179
Alex Howansky Avatar answered Sep 27 '22 22:09

Alex Howansky