Mac OS X Server 10.8 (Mountain Lion) Apache server listens on ports aside from the one defined by “Listen” in the apache config file

I had defined “Listen 8080” in /Library/Server/Web/Config/apache2/httpd_server_app.conf (if you have Server installed, it’s NOT /etc/apache2/httpd.conf any more), but for some reason, it was also listening on ports 80 and 443. No, apache, I want you to listen on 8080, and I wanted to leave 80 and 443 open for my other web application.

After digging around, I found the following lines at the bottom of /Library/Server/Web/Config/apache2/httpd_server_app.conf. It basically offers additional handlers for “any” traffic on those ports. I commented them out, and apache can still run, without touching port 80 (which we want to reserve for OUR application.) Commenting ALL of them might not be the best behavior, but it’s what works for me.

#    Include /Library/Server/Web/Config/apache2/sites/virtual_host_global.conf
#    Include /Library/Server/Web/Config/apache2/sites/0000_any_80_.conf
#    Include /Library/Server/Web/Config/apache2/sites/0000_any_443_.conf

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: