f l a m e . o r g

organized flames

Fun With Apache and Virtual Hosts

Posted on October 31, 2007

Specifically, name based virtual hosts.

I recently tried to add IPv6 support to my web server. I used to have it, I remember having it, so this should not be all that hard.

After an hour of hacking, I ended up finding two gotchas:

  • Make certain, I mean certain, that all virtual hosts for name-based servers have a unique ServerName line.
  • Make certain, and I mean certain, to save your original configuration files.

Yea, I know, I should have known better. But this is a simple thing to change, right?

A very useful tool is apachectl -S, which lists all virtual hosts. Even better is to run that output through sort