Load WordPress Sites in as fast as 37ms!

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, …

Webservices Turned Off

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

Author: Remon Pel

WebDeveloper though not WebDesigner

4 thoughts on “Restore Apache2 service after removal of Server.app”

  1. Thanks,

     

    I could not activate the userdir under El Capitan.  Modifying the config files in the /etc/ directory was not picked up by apache.  But I noted in the plist above the config files for apache and I went and modified the file

    /Library/Server/Web/Config/apache2/httpd_server_app.conf

    and that did the trick.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.