Was wondering if there was a way to see which virtual host entry is used for routing a request? Is there some way to add the name of the virtual host file being used for the request to the access.log
file?
Apache – Check which virtual host routes a response
apache-2.2virtualhost
Best Answer
The
LogFormat
directive can take a%v
placeholder which does exactly what you want.The
LogFormat
options are documented here: http://httpd.apache.org/docs/2.2/logs.html#virtualhost