Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

OS X Server port 16080 problem fix OS X Server
There is a problem with the default settings for the webserver on Mac OS/X 10.x Server where if you change the server to another IP or name, all kinds of redirects point to a :16080 port. This happened to me on a machine with a single IP address. When I gave the server a new address and reconfigured my services, all requests for a /~user site resulted in a :16080/~user being returned to the web-browser.

Of course, a lot of firewalls are not set up to handle those ports, so fixing the server is a better way of solving this problem. Read the rest of the article for instructions on how to do just that...

[Editor's note: I don't run OS X Server, so I can't vouch for either the bug or the fix, but it makes sense on a quick read-through.]

The answer lies in the /private/etc/httpd/httpd_macosxserver.conf file.

Make a copy of that file and edit the copy!

Search for a part which looks like this:

##
## Used by Mac OS X Server Admin only (mandatory section).
## "Preferences" site that gives default values Server Admin clients
## might want to use when creating new sites. This site must always
## be disabled and clients should never delete it. Server Admin will
## also use this site to create the first default site at
## post-install time.
##

#<RAdmin 99>
#NameVirtualHost 10.0.0.2:80
#Listen 10.0.0.2:80
#<VirtualHost 10.0.0.2:80>
#ServerName foo.bar.com
#WebPerfCacheEnable On
#SiteAutomaticallyDisabled Off
#ServerAdmin sysop@bar.com
#DocumentRoot "/Shared Items/www"
#DirectoryIndex index.html
#CustomLog "/private/var/log/httpd/access_log" "%h %l %u %t "%r" %>s %b"
#ErrorLog "/private/var/log/httpd/error_log"
#<IfModule mod_ssl.c>
#SSLEngine Off
#SSLLog "/private/var/log/httpd/ssl_engine_log"
#SSLCertificateChainFile "/private/etc/httpd/ssl.crt/ca.crt"
#SSLCertificateFile "/private/etc/httpd/ssl.crt/server.crt"
#SSLCertificateKeyFile "/private/etc/httpd/ssl.key/server.key"
#SSLCipherSuite "RSA:-HIGH:-MEDIUM:-LOW:+EXP"
#SSLPassPhrase foo.bar.com:80 ""
#</IfModule>
#<IfModule mod_dav.c>
#DAVLockDB "/private/var/run/davlocks/.davlock"
#DAVMinTimeout 600
#</IfModule>
#<Directory "/Shared Items/www">
#Options All +MultiViews -ExecCGI -Indexes
#AllowOverride All
#<IfModule mod_dav.c>
#DAV Off
#</IfModule>
#</Directory>
#</VirtualHost>
#</RAdmin>

You will notice that every line starts with a # and that the IP address mentioned above will not match the one you use at the moment. This will probably be the IP address you used when setting up the server for the first time.

Change the IP and names to the one the server should be using right now. Leave all the #'s in place!

Now to fix the wrong setups of your current sites:

Down the file you will see the same stanzas as above with some things slightly different. There is a stanza for each of your sites. Change every instance of :16080 to :80 you find in these stanzas. Check for wrong site URLs as well.

Save the file and restart your server. Check the functionality of all your sites and keep the backup httpd_macosxserver.conf file for at least a month. You never know...

And by the way: you can automatically add extra default page-names to the template above. I use

#DirectoryIndex index.html index.htm default.html default.htm

to serve any known index-page.

Good luck!
    •    
  • Currently 1.50 / 5
  You rated: 3 / 5 (6 votes cast)
 
[17,074 views]  

OS X Server port 16080 problem fix | 8 comments | Create New Account
Click here to return to the 'OS X Server port 16080 problem fix' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
this has been a mystery to me...
Authored by: meancode on Dec 19, '01 01:25:44PM

hey,

Rob, i can vouch for this one, this happened to me almost immediatly after i took the server out of the box. THANKS A LOT for the post. i even asked out Apple SE and he really didnt have an answer for me.

we didnt change the DNS or the IP, i dont remember changing any settings at all. we ended up taking the extra 4 port eithernet PCI card out of the box, but that did not help. this 16080 thing has baffled me as to why. i stopped wondering why and have been looking for a way to fix it. thanks a lot. it is apreciated.

i had tyed messing with the httpd_macosxserver.conf file with no luck thus far, gonna go try again.



[ Reply to This | # ]
Port 16080 is Performance Cache
Authored by: hoss on Dec 19, '01 03:29:17PM

The issue with Apache using port 16080 instead of port 80 in Mac OS X Server 10.04 and higher has nothing to with anything but the Performance Cache option which you guys must have turned on. If you turn off the Performance Cache you will not have this problem.



[ Reply to This | # ]
Port 16080 is Performance Cache
Authored by: sfn on Dec 19, '01 10:04:12PM

I believe the default is ON. It also screws up the logfile.



[ Reply to This | # ]
Port 16080 is Performance Cache
Authored by: martskin on Apr 24, '03 02:38:33PM

Thanks! The default is on. Turning it off fixed the 16080
problem. What exactly is Performance Cache supposed to do?



[ Reply to This | # ]
OS X Server port 16080 problem fix
Authored by: ComAge on May 11, '06 05:38:36PM

I am running Tiger Server and am having this 16080 port thing too. I like your thinking here except in Tiger there is no httpd_macosxserver.conf file. There are seperate files for each domain hosted on the Xserve i.e. 0000_155.212.xx.xxx_80_domain-name.com.conf and if I open those and change the 16080 to 80 it still seems to forward to that port? Hmmmm, is there another way? Another master file perhaps? It does not seem to mention it in the main Apache conf file. I'M BAFFLED! Turning off performance cache makes it even worse, then I get page not found errors.



[ Reply to This | # ]
OS X Server port 16080 problem fix
Authored by: inboxdesign on May 14, '06 04:02:23PM

I have the same problem running Tiger, that port :16080 always gets inserting, bvreaking my site/ and using more resources that it shoud.

How Do i completly disable the port completly?

Thanks



[ Reply to This | # ]
OS X Server port 16080 problem fix
Authored by: cotillard on Sep 25, '06 06:04:08PM

You can turn it off (per sites) in the Server Admin app.

under -> Web/Settings/Sites/yoursite/Options



[ Reply to This | # ]
OS X Server port 16080 problem fix
Authored by: KlausMcVenus on Nov 14, '06 03:12:24AM
I've discribed instructions how to fix the 16080-problem in my blog :
http://83.236.149.205/weblog/klausmcvenus/ProgrammingTheMac/?permalink=MacOSXServerConfigurationPor.html

[ Reply to This | # ]