How to adapt Apache configuration to OS X Server?
I'm trying to get Server working on a Mac Pro that had been very happily running a number of websites with the built-in Apache installation all the way up to and including 10.8. Sigh. Server has been a complete nightmare in a bunch of areas, but especially with getting the websites working properly. Things are sorta kinda working, but I'm nowhere near where I was before. Maybe someone here can help...
Here's how things are set up:
- My Apache config files are still in /etc/apache2 -- the main stuff is in httpd.conf, with a number of site definitions in /etc/apache2/other; these get loaded through an include statement in httpd.conf.
- I've created entries in the Websites section of Server pointing to the sites. I've left the sites' files in /Library/WebServer/Documents where they used to be, and pointed the server entry to those files via the "Store Site Files In:" option. In the cases where the domain name is something like example.com, I've set up the "Domain Name" entry in Server as www.example.com. I've then added "example.com" as an "Additional Domain"
What's happening is that the "www." versions of the sites are getting found and presented, but the basic domain doesn't work -- visiting www.example.com works, but visiting example.com doesn't. In addition, some of the sites have nontrivial (and necessary) stuff in their config files -- redirection and the like -- and it's clear that the things specified there aren't happening.
So, as a first guess, it looks like the config files in /etc/apache2 aren't getting read, or interpreted, or whatever. If this is meant to be a real web server tool, surely there's a way to handle custom Apache configurations. Does this may sense to anyone? Are there any clues out there? To my eye, getting this stuff working should have been trivial, and it's been nothing but a nightmare.
Mac Pro, OS X Mountain Lion, plus Server