Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Routing multiple FQDNs to one LAN server  (Read 4819 times)

Mick

  • Reg Member
  • ***
  • Posts: 292
Routing multiple FQDNs to one LAN server
« on: January 09, 2009, 10:41:20 AM »

Hi All,

Could you please advise what options are there (other than DMZ) to configure a router to allow multiple FQDNs to be routed to an apache server on my LAN, which is running a number of virtual hosts?  In this particular setup I have DynDNS pointing all these domains to one IP address - which I get via dhcp from my ISP.
Logged
Regards,
Mick

mr_chris

  • Kitizen
  • ****
  • Posts: 3774
Re: Routing multiple FQDNs to one LAN server
« Reply #1 on: January 09, 2009, 02:20:42 PM »

I think you're getting a tad confused as to how virtual hosts work?

Your router does now know or care what domain name somebody has typed in at the other end - their web browser makes a connection to your router's public IP address on port 80, which your router then forwards straight through to your Apache box.

The remote browser and your Apache box are then effectively talking to each other. Remote browser sends a request that will include the following two lines:

GET /somepage.htm HTTP/1.1
Host: www.micksite1.co.uk

It's the Host: line that makes the concept of virtual hosts possible. If you had www.micksite1.co.uk configured as a virtual host in Apache pointing to a particular directory, then this is where the page will be served from.

As long as you forward port 80 to your web server, that's all you need to do. You set up virtual hosts within Apache. I don't know how to do it but I imagine it's somewhere within httpd.conf (everything else seems to be!!). There are probably a million or more tutorials on how to do this on Google :)
Logged
Chris

Mick

  • Reg Member
  • ***
  • Posts: 292
Re: Routing multiple FQDNs to one LAN server
« Reply #2 on: January 09, 2009, 03:07:24 PM »

Thank you mr_chris,

I don't think I am getting confused as to how virtual hosts work - have been using them for the last 3 years or so and have no difficulty configuring apache to serve them.

Port forwarding would indeed be a solution if there was only one server in my LAN.  However, I have left some info out on the original post to reduce complexity.  Please let me explain better:  I have more than one device listening on port 80 (IP thermostat) and port 443 (router admin GUI).  So, I was looking for a set up when a request arrives at the router, to allow it to be routed to the right machine:  router GUI, apache, A.N.Other.  I was suspecting that VRF might do it - but I have no experience in setting one up.  Also, I am not sure if there are other options to allow me to set up something like this without using multiple Internet facing IP addresses and 1:1 NAT at the router.
Logged
Regards,
Mick

mr_chris

  • Kitizen
  • ****
  • Posts: 3774
Re: Routing multiple FQDNs to one LAN server
« Reply #3 on: January 09, 2009, 03:41:08 PM »

Ah, the extra info makes it a completely different situation! I'm sorry if I came across as patronising, but from what you said, it seemed you were asking how to configure a simple one-webserver setup with multiple hosts, and I couldn't really see the issue... so (wrongly) assumed you didn't quite understand something.

There is definitely nothing within a consumer router that would allow this type of setup. Not sure how VRF works (in fact I had to just look it up to see what it was lol)

What apache CAN do is reverse proxying though. So the way I could see your setup working is this:

All web requests are port forwarded to one of your web servers. On this server you need to confgure a virtual host for each domain you want to deal with, and instead of specifying a document root, you specify using ProxyPass and ProxyPassReverse directives which internal address that requests for this domain name will get forwarded to.

Reverse proxying can coexist with a normal webserver on the same machine, which means you don't have to set up an extra machine just to deal with this.

I have never set this up myself, but it looks reasonably straightforward, and there's tons of information on the net about setting it up.

This page looks reasonably useful, although I just found it by googling, so it might be a load of rubbish! At least the term reverse proxy gives you the right thing to search for :)

Good luck :)
Logged
Chris

Mick

  • Reg Member
  • ***
  • Posts: 292
Re: Routing multiple FQDNs to one LAN server
« Reply #4 on: January 09, 2009, 03:49:00 PM »

I will have to search a bit more if my router (cisco clone) will do what I want, but reverse-proxying is indeed another way to skin this cat, especially if I can't find a way of doing this through my router!  Thank you for the suggestion.   :)
Logged
Regards,
Mick

mr_chris

  • Kitizen
  • ****
  • Posts: 3774
Re: Routing multiple FQDNs to one LAN server
« Reply #5 on: January 09, 2009, 03:53:27 PM »

You're welcome. Incidentally what router do you have?
Logged
Chris

Mick

  • Reg Member
  • ***
  • Posts: 292
Re: Routing multiple FQDNs to one LAN server
« Reply #6 on: January 09, 2009, 11:55:08 PM »

It is a Netvanta 3120 by Adtran.  Similar to a Cisco in terms of OS and features/capability.
Logged
Regards,
Mick