Last Updated: February 25, 2016
·
565
· peterjmit

Debug Apache Vhosts

Having trouble working out your apache vhosts? Especially if you have many on one box.

See a list of the port, name and location of all your virtual hosts, also verifies the syntax of your virtual hosts.

$ apachectl -t -D DUMP_VHOSTS

Example output:

*:80 is a NameVirtualHost
port 80 namevhost example.co.uk (/etc/apache2/sites-enabled/example.vhost:1)
Syntax OK