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 1 server that is already taking up port 80 (a live site), and I have another server running wordpress mu that can ONLY run on port 80.

Is there a way with my router to transfer port 81 to look like it is port 80 to the wordpress install?

share|improve this question

Setting up a port forward should be simple. Are you using the stock firmware or something else else like ddwrt? The problem you may have is that the wordpressmu install may output absolute URLs. If it does, they will not include the correct port.

You could setup a HTTP proxy that you forward port 80 to. That proxy can then be configured to forward the request to the correct internal host based on the hostname. If your existing web site is already running apache, you could even just setup an additional virtual host there and enable the proxy.

share|improve this answer
this is how i would do it. put a virtual host of that forwards that URL to port this also requires opening port 81 on the firewall because of the redirect. NOTE: there might be better ways that apache can handle the redirect on port 80 rather than 81 but i am not super experienced with it. – djangofan Jan 21 '10 at 18:37
Not only does MU use absolute urls... only port 80 will work with it. The MU site is dev, but we want to open it up to the client. I'm actually not sure if any of this is possible. I don't want to have to rent another server just to make this site accessible. – Jeremy Boyd Jan 21 '10 at 18:54
you never said what webserver you are using to host WordPress. if its apache, you can create a virtual host that makes liveserver:81 appear to be liveserver:80/wordpress to the client user. not only that but you can password protect it probably. – djangofan Jan 22 '10 at 1:02
ill enter a separate answer. – djangofan Jan 22 '10 at 1:04

Assuming that the request is coming externally through the router you can set it to forward the external port 81 to the IP and port 80 on your internal server.

Check the firewall setup and the add a port-forwarder.

It's here in the setup:

Applications and Gaming > Port Range Forward

From the manual:

To forward a port, enter the information on each line for the criteria required.

  • Application In this field, enter the name you wish to give the application. Each name can be up to 12 characters.

  • Start/End This is the port range. Enter the number that
    starts the port range in the Start
    column and the number that ends the
    range in the End column.

  • Protocol Select the protocol used for this application, either TCP or UDP, or Both.

  • IP Address For each application, enter the IP Address of the PC running the specific

  • Enable Select Enable to enable port forwarding for the relevant application.

share|improve this answer
This will not work, as Both IPs need to use port 80 – Jeremy Boyd Jan 21 '10 at 18:51
So, really, you need two port 80's to be facing externally. For that you need something internally to handle the separation. You could have the router send all requests to one of the servers, and have that use host-headers and mod_rewrite to forward the requests on, either externally to the other server, or internally to the webserver on that host as required. I know apache can forward requests to another host, and would do it. – Alex Jan 21 '10 at 19:53
here I'm assuming on linux you're running Wordpress Mu on Apache... so, have all requests go to that, and forward as necessary to IIS. – Alex Jan 21 '10 at 19:54

The problem with the methods mentioned so far is that the solution is either more complicated than it needs to be (proxy, multiple port forwarding settings) or puts the burden on the client (alternate port). Why not run both sites on port 80 and use host headers to differentiate the two? This allows you to have a single port forwarding rule on your firewall (port 80), allows you to run multiple unique web sites internally, and allows your web site visitors to connect as they would with any other web site without having to specify the port number in their browser. I run 6 unique web sites on my home server this way.

This should work unless I'm misunderstanding your question.

share|improve this answer
Two separate servers, one ( is windows with iis 7 the other ( is a linux server running Wordpress MU. Host headers wont work in this case. – Jeremy Boyd Jan 21 '10 at 18:50
Gotcha. I missed that in your question. Thanks for the clarification. – joeqwerty Jan 21 '10 at 19:25

I've never tried this but this should work without needing to restart the network adaptor nor taking down the live site for any reason:

Use an IP based virtual host approach:

To make it work, bind your network card to 2 internal NAT IP addresses by adding the second IP in the network properties. Make Wordpress run on one of the IP addresses and the livesite run on the other IP address.... both on port 80. Then use your hosts file to send to one IP and to the other IP address. Also, from the outside world make the domain resolve to the correct IP.

share|improve this answer
up vote 0 down vote accepted

I was able to overcome this using a reverse proxy in IIS, that works like mod_proxy and translates everything after the / to the internal site using the HOSTS file and mapping the domain to the internal IP. It is messy, but it works.

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.