Super User is a question and answer site for computer enthusiasts and power users. 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

The Problem: I have 2 domains, 2 web servers, 1 WAN IP. 1 server is hosting, and the other should be hosting, I forwarded the domain, to a port that is forwarded to that box. wanip:1235, 1235 is then forwarded to the internal IP of site2's server. But when I go to I get the 404 page of

I need to go to the right server. Is this something I can do in the virtual hosts of or is it something else.

Also, if this isn't entirely possible, or if its a big process, I can just move to the's server, and use virtual hosts, that is an option that I would be okay with.

Update: I found a problem. When I go to my wanip I get the which is correct, when I go to my wanip:1235 its correct, its Perfect. But my needs /blog/wordpress to be in the right directory, so when I go to www.wanip:1235/blog/wordpress my browser switches it to wanip/blog/wordpress so it goes back to and 404's because that box doesn't have /blog/wordpress

Why does it decide to ignore the port when I add a directory?

share|improve this question

migrated from Nov 23 '11 at 23:09

This question came from our site for system and network administrators.

Questions about home networks are not allowed on Server Fault. Per the FAQ "[Server Fault] is not about Networking outside the professional workplace or Running servers at home". – Chris S Nov 21 '11 at 17:38
up vote 2 down vote accepted

If you are forwarding 1235 using your router then make sure you have the ip address of site2 correct, because you shouldn't be getting the 404 of site1! Also maybe you copied the config from site1 to site2 and forgot to change the 404??

If you say want and to run on the same port, you could forward all requests to site1, then use apaches reverse proxy ( to pass the request to site2. However it might just be easier to host all on one server.

share|improve this answer
Hmm, no I have 2 ip's (site1) (site2,) its going to site 2, 1235 forwards to port 80 on Its a different config, I didn't copy anything over, just did a fresh install, its on default configs, because site2 has no content yet, just trying to get the domain going to it. – Tillman32 Nov 21 '11 at 17:41
if you open locally do you get site1 404s? Sounds like a router problem if not. – cosmorogers Nov 21 '11 at 17:47
Locally, I get the right page. I guess I'll have to double check everything with my router. But when I go to my WAN IP with a :1235, I also get the right page... maybe my domain isn't forwarding right? Could be a godaddy domain setting? – Tillman32 Nov 21 '11 at 18:05
I actually think I may have located some more info about the problem. When I go to my wan ip with the port :1235, I get the right page... But when I go to my wan ip:1235/blog/wordpress (site2) my browser redirects it to wanip/blog/wordpress and 404's because that directory doesn't exist on site 1... so why is it refusing to use a port when I'm also including a directory? – Tillman32 Nov 21 '11 at 18:11
Thats a wordpress problem then. If I remember correctly you set the domain / server name in wordpress (somewhere). You need to add the port to that setting otherwise it will redirect to that setting – cosmorogers Nov 21 '11 at 20:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .