3
1
Here's my home setup. I have a single IP address provided by my ISP. I have one top-level-domain (TLD) and several sub-domains that point at that IP. Internet comes in through my cable modem and plugs into my AdvancedTomato router. I want to install several web servers on separate machines and have the router forward the traffic based upon the domain name. Here's a basic picture
Internet
|
|
└── example.com-x.x.x.x(router)
├── machine1-192.168.1.101
│ ├── project11.example.com
│ └── project12.example.com
├── machine2-192.168.1.102
│ ├── project21.example.com
│ └── project22.example.com
└── machine3-192.168.1.103
├── project31.example.com
└── project32.example.com
I have been able to do this already on a single machine using basic port forwarding on the router (everything on port 80 goes to machine1), then using Apache's VirtualHost's on that machine to open different websites.
Internet
|
|
└── example.com-x.x.x.x(router)
├── machine1-192.168.1.101
├── project11.example.com
└── project12.example.com
My question: is it even possible to do this at the router level? If not, how do large websites set this up.I know HTTP is at the application level, and that's where the domain request is, so can the router even look at that information? Would I need a proxy server?
Also, should this be on server fault instead?
Reverse Proxy! Thanks this is exactly what I need. AdvancedTomato as an nginx webserver on board, so I'm going to take a shot with that. I'll update with my results – TinyTheBrontosaurus – 2016-03-27T15:16:58.650
Welcome to the team SU. Thanks for updating and fixing the answer, It's always nice to have questions with tested answers, if you do end up getting a full working solution please post link or something, i might even switch from dd-wrt to tomato based on your link – SeanClt – 2016-03-29T01:24:44.680