John's Blog: Turning Off OS X Server's HTTP Service

Important Update! Since this article was originally posted, things have changed. The information below relates to OS X Server 4 and earlier. There is an updated blog post that describes how to handle this issue in OS X Server 5 HERE.

December 4, 2012

In general, Rumpus and OS X Server get along great. Rumpus includes it's own HTTP and FTP server engines which are totally separate from the Web and FTP servers built into the system, so they coexist very well. The exception to this is port conflicts, when OS X Server and Rumpus try to use the same port for one or more services.

If you need to run both Rumpus and OS X Server Web services, you can run one service on the primary Web port (80) and another on an alternate (like 8000). In Rumpus, you can specify the Web server port on the "Web Settings" window, "Options" tab, and the secure Web port on the "Network Settings" window, "Secure Services" tab. But if you don't need OS X Server's Web service, the better option is to turn it off so that Rumpus can run on the default Web port, simplifying access and minimizing client firewall problems.

Unfortunately, turning off OS X Server's Web service can be tricky...

"Is anybody at home?" ... "No, nobody here."

Turn off Web service in OS X Server and try to connect from a Web browser. You may get a reply saying, "Web service is off." Of course, in order for the server to respond with the "Web service off" message, the Web server has to be on, so OS X Server ends up blocking Rumpus even though it's not really doing anything.

The reason OS X Server leaves Apache on, even though Web services are disabled, is because there are other server functions which use HTTP as the basis for service. These functions include Calendar, Contacts, Wiki, and possibly others. So the first thing to do is disable all HTTP-based services. It's possible that you never even enabled these services, especially if you upgraded from an older version of OS X Server. Regardless, go through and disable all OS X Server services you don't expressly need, especially, Calendar, Contacts, and the Wiki server.

Depending on your OS X Server setup, that may be all you need to do, but if OS X Server is still binding to the HTTP or HTTPS ports, you can manually turn Apache off.

Manually disabling Apache

On the server, open Terminal ("/Applications/Utilities/"). Now enter the command "open /System".

A folder should open in the Finder. In that folder, drop into the "Library" folder, then "LaunchDaemons". Scroll the folder list to make sure the "org.apache.httpd.plist" file is visible.

Next, tell the system to turn off Apache by flipping back to the Terminal and entering:

    sudo launchctl unload -w

Don't press return yet. Add a space after the "-w", and then drag the "org.apache.httpd.plist" file into the Terminal window. The whole command will look like this:

    sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

Now press return and complete the system admin password prompt to stop Apache.

On at least some systems, OS X Server won't give up so easily, so to be sure Apache stays off, you'll next want to remove the daemon startup file. Back in the Finder, make a copy of the "org.apache.httpd.plist" file by dragging it to the desktop. The Finder probably made a copy of the file, rather than move it, so drag the original file out of the "LaunchDaemons" folder to the trash, then empty the trash. You will probably be prompted for your system administration password at least once. Just enter it as needed.

Make sure that the "org.apache.httpd.plist" does not exist in the "LaunchDaemons" folder, then close the folder and restart the server. (A server reboot is a good idea to make sure that Apache doesn't restart at boot time, which could cause problems in the future.)

Final Notes

You should now be able to start Rumpus and have it provide service on the default HTTP and HTTPS ports.

Please note that while I always try to help with any Rumpus-related issue, this is really an Apple problem. I hope the instructions above help, but it's possible that future versions of OS X Server, or even current versions with slightly different setups, may not respond to unloading and removing the Apache startup file. If you continue to have problems, the definitive source for information about OS X Server is Apple, so please contact them. If you do discover better ways of dealing with the problem, please let me know so I can update this page for future users.

© Copyright 2023, Maxum Development Corp.