Configuring macOS Server.app v5 to bind to a particular IP Address

It’s long been a painful thing for me that macOS Server.app not only binds to all IP addresses on a system, but takes port 80 and 443, even if all web-related services are off. It’s also a major annoyance that while Apple have published methods for having your app sit behind Apache as a reverse proxy in Server.app, no one uses this functionality, not even Apple’s own subsidiary FileMaker Pro.

Actually, it’s even worse than this, the latest version of FileMaker Pro absolutely refuses to install on a Mac with Server.app installed – claiming that the installer can’t even run when Apache is running. On a Mac with Server.app installed, you can not completely shut down Apache using anything in the GUI, it’s simply impossible to do so.

Now that I’ve got that rant out of the way, John over on the Rumpus blog has written up a post describing how to get Server.app to bind to a particular IP. This is helpful if you want something else, such as Kerio Connect, to be able to use port 80 and 443 on a different IP on the same machine

http://www.maxum.com/Rumpus/Blog/OSXServer5Conflicts.html

The basics, reproduced here in case the link ever goes down, are:

In /Library/Server/Web/Config/apache2/httpd_server_app.conf find the line that looks like this:

#Listen 12.34.56.78:80
Remove the comment and set the IP address to the address that you have assigned to Apache. For example, if the address you have assigned to Apache is “192.168.1.100”, you would change the line to:

Listen 192.168.1.100:80
Save the change, close the file, and then open the file:

/Library/Server/Web/Config/Proxy/apache_serviceproxy.conf
In this config file, you will find “listen” configuration settings for several ports, including 80, 443, 8008, 8800, 8443 and 8843. Alter them so that instead of an asterisk, the Apache address is specified. To set OS X Server’s proxy service to bind only to the example address “192.168.1.100”, the “listen” config section would look like this:

listen 192.168.1.100:80
listen 192.168.1.100:443
listen 192.168.1.100:8008
listen 192.168.1.100:8800
listen 192.168.1.100:8443
listen 192.168.1.100:8843

This article was posted by Kai Howells. If you liked this content and have any technical work in the Melbourne area, say hello via my contact form or give me a call on 0419 361 653 - I cover most of the greater Melbourne area and my rates are competitive.

Leave a Reply

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