Checking Apache’s VHost Configuration

Tux - the linux logo

This is more of a note for myself than anything else.

When using Apache 2 it’s useful to see exactly what it “thinks” it should be doing with virtual hosts.

The “apachectl2” utility can check if the Apache configuration is correct syntactically, but that won’t help you see what exactly it’s trying to do, as in which sites it’s trying to serve.

However if you run:

apache2ctl -t -D DUMP_VHOSTS

It will dump out to the screen exactly which vhosts it’s trying to load.

Of course this still leaves me scratching my head about one of my sites, which seems to have vanished.. but at least I’m a step closer to finding out why it’s not working.. For now it is serving most of the sites without issue, but one or two aren’t loading correctly.. Time to check the logs!

Published
Categorised as apache

By Michele Neylon

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version