cancel
Showing results for 
Search instead for 
Did you mean: 

Running two services on port 80

N/A

Running two services on port 80

Hi,

I was wondering if anyone could help me to solve a problem I'm having.

I want to run two services on port 80 using my Free-Online domain name of http://nathanducey.free-online.co.uk

My current setup is as follows:

Internet -> Netgear ADSL Modem/Router -> Server1
-> Server2
-> PC
-> PC

My Netgear router is only capable of port forwarding, so I can only specify one server to receives requests on port 80.

Is there a way I can filter the incoming requests on port 80 and direct them to the correct server using my current setup?

Or would it be possible to run a check on my server that accepts all port 80 requests and then that forwards onto my other server depending upon the headers?

I've had a look into this and have read different things covering VHosts, Reverse DNS and NAT setups. However, those all confused me a bit.

Does anyone know if what I want is possible or how to go about doing it?

Any help is much appreciated.

Thanks, Nathan
4 REPLIES
N/A

Running two services on port 80

What netgear router do you have?

To be honest I'm not sure the netgear routers have enough control of the traffic passing though them to actually do, what you want.

While you can set traffic from a certain address or IP range, to go to one server and the any other IP, or range, to go to the other Server. I don't think the Netgear router will process traffic via the packet headers.

However you could setup a linux box, after your router, to act as a firewall and filter your traffic, as this will check packet headers etc.
N/A

Running two services on port 80

Thanks for the reply gadgetboy, I have a Netgear DG824M wireless router/modem and it is only basic port forwarding that it offers. However, I decided against running two services on the same port, although that I could get both services to interact across my network once a request comes in.
axam102
Newbie
Posts: 3
Registered: 23-08-2007

Running two services on port 80

From the way you describe what you want, " I want to run two services on port 80 using my Free-Online domain name of http://nathanducey.free-online.co.uk " you will be left with very few differentiators in the header's for anything to use to redirect, as both domain name and port are exactly the same. You could possibly sort on the geographic location of an ip but I suspect that is of no use.
Your best bet would be a second domain name pointing to the same IP as your current one, force all traffic on port 80 via your router to a server running apache and name based virtual hosts. if your running it on a Unix box then name based virtual hosting is a doddle to set up ( I have no idea about windows) with a small entry in the httpd.conf file, see here for further details http://httpd.apache.org/docs-2.1/vhosts/name-based.html
this is possibly the easiest and cheapest method of hosting 2 separate sites with 1 IP.
Hope this helps

Regards

Nat
N/A

Running two services on port 80

Thanks for info nat, I did look into name based vhosts, but that wouldn't have worked. Also asked Free-Online if I could have mutliple IP addresses to point at my domain, but they said it wasn't possible.
In the end I setup one web server on port 80 and the other on port 8080, but have reverted back to using just one webserver now.
Thanks for your help and suggestions though Smiley