Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a two home server VMs set up. Windows 2008 server on port 80 and Centos/Redhat on port 8080. Both have separate godaddy domain name A name records pointing to them. But I cant point both domain to the same IP I only have 1 wan ip address at home. So one of my domain is forward to my IP:8080. My question: Is it possible for my windows server to redirect a certain domain name to my Linux server on port 8080? So i Have going to windows and also going to the windows server but windows would redirect traffic to the linux ip address:8080. I want to access both sites at my work and my work firewall is strict and will not allow domain forwarding from godaddy.

share|improve this question

migrated from Dec 19 '12 at 1:01

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

3 Answers 3

up vote 1 down vote accepted

My understanding is that you already have your router forwarding port 80 to Windows and port 8080 to Linux. Now you are trying to solve the issue of people typing in the domain name for the Linux server without the ":8080" and that traffic going to the windows box.

The solution is to create two websites in IIS and set them both to listen on the same IP address. The only difference will be the host header. That way when the web traffic reaches IIS it will look at the URL and direct the traffic to the right website based on the domain name. Here is the TechNet article on creating host headers.

After that is done all you need to do is setup the redirect of all traffic to the IIS Linux website to http://LinuxDomainName:8080 You can either write a redirect page in HTML or use the "HTTP Redirect" module in IIS.

Hope this helps...


share|improve this answer
Thanks Joe, That sounds like it will work. I will give that a try and report back. I am more familiar with Linux. I may be able to do the reverse using Linux virtualhost, and now I see a response below about that! – paulcap1 Dec 19 '12 at 0:10
I will check out those links. Just briefly looked at this guys IIS example and it looks like it could work.… – paulcap1 Dec 19 '12 at 0:34
Hi Joe, I am working on it now. I added the hostheader for my linux box in IIS, but still no luck. Was wondering if I need to change my server hostname to match my godaddy domain name? Let me explain it. I have 2 goddady domain a name records pointing to my windows server 2008R2 home server, its 1 Verizon wan ip address. It works and I can access But should my windows server hostname be called – paulcap1 Dec 20 '12 at 17:57
here is my ipconfig /all computer name of:windows20081 Host Name: windows20081 Primary Dns Suffix: windows1.local So will hostheader work if my server hostname is different than my godaddy domain? I have a home linux server and a home windows server, and 1 wan ip address. I also have 2 godaddy domain names. I want to use IIS hostheader to point 1 domain to my windows box and point the other domain to my linux box. – paulcap1 Dec 20 '12 at 17:57
my linux server hostname matches my godaddy domain – paulcap1 Dec 20 '12 at 18:05

What you're talking about is a Reverse Proxy. IIS appears to be able to do it, but I have no experience with IIS. In apache terminology, you need to use the proxy modules, with a VirtualHost for each domain ( and The Reverse Proxy then makes the request to each server (Windows or the CentOS/RedHat box) depending on which VirtualHost the original request was sent to.

The user (or you) enters whichever address you want ( or in their browser, which connects to the Reverse Proxy. The reverse proxy uses the HTTP "host" header to determine which site it needs to return, and it worries about the ports. The remote user is never aware that the CentOS/RedHat box is actually listening on 8080.

There are appears to be quite a bit of information in Google if you search for iis reverse proxy

share|improve this answer
This also makes sense, I am not to familiar with reverse proxy yet. Still learning. Would a linux virtual host like below be close to solving it. The is my versizon wan ip address. I dont know how to format this correctly in this editor. <VirtualHost> ServerName DocumentRoot "/var/www/html/mysite1/" DirectoryIndex index.php index.html index.htm </VirtualHost> <VirtualHost> ServerName DocumentRoot "/the correct windows directory?/" DirectoryIndex index.php index.html index.htm </VirtualHost> – paulcap1 Dec 19 '12 at 0:14
On the reverse proxy, you want 2 VirtualHosts both on port 80, one for each domain. Within those VHosts you then configure the Proxy module to reverse proxy each VHost to the appropriate "internal" server on the relevant port. – fukawi2 Dec 19 '12 at 2:23

You certainly can have both A records point to the same ip address. On your router/firewall you'll configure port forwarding for port 80 to go to one server and port 8080 to go to the other server.

Incoming traffic to x.x.x.x:80 will go to one server and traffic to x.x.x.x:8080 will go to the other server.

share|improve this answer
I think a Reverse Proxy solves the OP question better. – fukawi2 Dec 18 '12 at 22:30
That doesn't address paulcap1's issue of the redirect not being allowed by his work's firewall. Reverse proxy as mentioned by fukawi2 is necessary. – Paul Gear Dec 18 '12 at 22:31
I'm missing something. I don't see how/why a redirect or proxy is needed. 1. - 2. Is it the case that the OP doesn't want to specify the port? If it is then I did miss that and my apologies. – joeqwerty Dec 18 '12 at 23:11
My current setup using a godaddy forward to my IP:8080 works fine out in public. But most government agencies have strict firewall rules. After doing some testing I found that they block domain name that are using a godaddy forwarded. I work at an agency that is blocking my forward. – paulcap1 Dec 19 '12 at 0:23
What I mean is my current set up is a godaddy forward to x.x.x.x:8080 which is my linux box. The gov. agency firewall rule block all domain forwards. For anyone with your online resume hosted in this set up.. beware. Most gov. agencies will block it and will not see your resume. – paulcap1 Dec 19 '12 at 1:35

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.