Remons TechNotes

Restore Apache2 service after removal of Server.app

After experimenting with Apples Server.App and removing it (for not really needing it) the built-in Apache was no longer functioning and all I could get out of it was; “Websites are turned off. An administrator can turn them on using the Server application.”

The fix is simple, but finding where to fix, …

The file you need to edit; /System/Library/LaunchDaemons/org.apache.httpd.plist

Shell commandsudo nano /System/Library/LaunchDaemons/org.apache.httpd.plist

remove the bold lines;

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>SERVER_INSTALL_PATH_PREFIX</key>
        <string>/Applications/Server.app/Contents/ServerRoot</string>
<key>XPC_SERVICES_UNAVAILABLE</key>
<string>1</string>
</dict>
<key>Label</key>
<string>org.apache.httpd</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
<string>-f</string>
        <string>/Library/Server/Web/Config/apache2/httpd_server_app.conf</string>
</array>
</dict>
</plist>

Then, unload and load the plist file;

Shell commandsudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Shell commandsudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Exit mobile version