I've been using the excellent VirtualHostX to set up my virtual hosts on OS X for a while now. It works great for setting up Apache virtual hosts and local domains.
A couple days ago, I decided to install OS X Server. When I enabled the web server portion, it seemingly disabled my virtual hosts and started showing its own page:
Apparently, there's no easy way to uninstall OS X Server.
I called AppleCare and they transferred me to the enterprise Mac support line. The tech sent me to this page:
http://help.apple.com/advancedserveradmin/mac/10.8/#apd9eb9f4ab-1377-47e6-a2c4-1311e25a74df
Using that document, I found the main configuration file.
sudo pico /Library/Server/web/config/apache2/httpd_server_app.conf
In that file, I found the following comment:
# When Server App is installed, this file is used instead of /etc/apache2/httpd.conf
# At Server.app promotion time this file is copied to
# /Library/Server/Web/Config/apache2/httpd_server_app.conf and Apache's launchd.plist is
# modified to use it as the main config file.
So, OS X Server changes the way OS X configures Apache and actually loads a completely different httpd.conf file. In fact, in my testing, this httpd.conf file is copied over every time you visit the Server panel.
Luckily, it's a super easy fix.
sudo pico /Library/Server/web/config/apache2/httpd_server_app.conf.default
sudo pico /Library/Server/web/config/apache2/httpd_server_app.conf
Uncomment the line (line number 548 in my case) that looks like this:
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
You might also have to uncomment PHP:
LoadModule php5_module libexec/apache2/libphp5.so
Make sure to do this to both files.
You can do this in VirtualHostX or from the Terminal:
sudo apachectl -k restart
If you have any trouble with this, feel free to tweet me at @jamonholmgren.