Cleanup apache config for Lion Server
You can restore the web server to factory settings.
- Turn off the Web Server service
- Open Terminal and run
sudo serveradmin command web:command=restoreFactorySettings
- Enter your administrator password
- Restart Web Server service.
If that didn't do the trick,
- turn off everything which uses Apache (Wiki, iCal-Server ...)
-
run the following command
sudo /System/Library/PrivateFrameworks/ServerFoundation.framework/Resources/xswebconfig restorefactorysettings
The answer using serveradmin
to reset factory defaults calls the xswebconfig and sometimes you need to force the lower level reset and consider other web based services that may lock and prevent a shutdown of the service.