Reset Apache In OS X Server To Factory Defaults

The serveradmin command can also be used to run commands. For example, to reset the service to factory defaults, backup then delete the configuration files for each site and then run the following command: sudo serveradmin command web:command=restoreFactorySettings This is pretty timely as I’ve seen a very high rate of pretty messed up configurations from the Server 4 to Server 5 upgrades. Basically, what seems to happen is that older servers, that were running let’s say Server 2 and Server 3 and Server 4 and now Server 5 will have a little cruft. Sites with older configurations that are incompatible with the latest proxy-based config. And finding the specific problem vs the time it takes to just reset and rebuild any specific settings is rarely worth it. So, there ya’ go. If you get errors like “Websites are turned off. An administrator can turn them on using the Server application.”  when you try to view any page other than the index.html page of a custom site, then you can probably just trash the config and go from there. Enjoy.