Apache vhost - debug web request

Hello all,

I have several vhost and not sure which vhost is serving the requests to my url
http://www.mydomain.tld i have ssh access to the web server

is there a way e.g curl to know exactly which vhost served the request.

one of my friend suggested logs but i want to find another alternative.

thanks.

Please clarify your configuration. Are you suggesting that you have a main URL that is set up to be redirected to vhosts? Is this a load balancing scheme, round robin,... Are these vhosts on the same system?

there are no redirections and no load balancing.

yes, all vhosts are running on same server

thanks

The request is processed by a virtual host with a matching ServerName or ServerAlias . If no one matches the url, the first virtual host defined will process the request.

You can dump some configuration settings, including all vhosts, with httpd -S or apachectl -S .

You also might consider defining a custom log format including the %v specifier to print out the ServerName handling this particular request.

1 Like

this is a nice tip.thanks

from outside without any ssh access to the server is there a way to debug this ?