Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have read countless articles on setting up a domain on WAMP to listen on a port other than 80; none of them are working.

I've got Windows Server 2008 (Standard) with IIS 7 installed and running on port 80 (and 443).

I've got WAMP installed with the following configuration.

Listen 81
DocumentRoot "C:/Path/To/www"
<Directory "C:/Path/To/www">

    Options All MultiViews

    AllowOverride All

#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all


localhost:81 works with the above configuration but does not.

Just to make sure my firewall wasn't getting in the way I have disabled it completely.

My domain is already pointing to my server and works on IIS on port 80.

Also, if I disable IIS and change the Apache port from 81 to 80 it works.

Yes, I am restarting Apache after each httpd.conf change. :-)

I don't need any other domain (or sub domains [I don't even care about localhost]) configured which is why I'm not using a VirtualHost.

Any ideas what is going on here? What could I be doing wrong?


Changing Listen to 80 but keeping ServerName as causes navigation to to work; this just doesn't seem right to me. Could ServerName be ignoring the :port part somehow?

netstat -a -n | find "TCP":

>netstat -a -n | find "TCP"
  TCP                 LISTENING
  TCP                LISTENING
  TCP                LISTENING
  TCP                LISTENING
  TCP         TIME_WAIT
share|improve this question
-- comment removed since the question the comment answered was removed -- – David Murdoch Jun 27 '11 at 20:15
Post the output of netstat -a -n | find "TCP", or at least the entry for Apache. Specifically has Apache bound to,, or one of the IP addresses assigned to your host? – Zoredache Jun 27 '11 at 20:17
I've updated the question to provide the full netstat -a -n | find "TCP" command you requested. – David Murdoch Jun 27 '11 at 20:24
Updated with more info – David Murdoch Jun 27 '11 at 20:37
Strange, the port on the ServerName is optional I think, try without it. – faker Jun 27 '11 at 20:50
up vote 0 down vote accepted


The router was configured to allow ports 80 and 443 only. That is why port 81 worked with localhost but not the domain.

I just needed to forward ports 80 AND 81 to the web-server and it worked.

share|improve this answer
Remember to come back and click the check mark. – Michael Hampton Oct 31 '12 at 0:58

had to set up the same thing recently. There is a registry hack you have to perform to get it to work. Check out this website article for more info. Specifically the section on editing the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.