Just how do I course internet demands right into my private network relying on the domain name in the url?
As a result of minimal variety of IPs, numerous domain names are settled right into the very same IP address. Nonetheless, these domain names might not all worked on the very same webserver, VM, or perhaps committed equipment. Consequently, I would love to course the domain names at the factor of access right into the private network to the appropriate position on problem of the domain name in the url.
Just how can I do this?
I am unclear if I totally recognize your inquiry. If I do, you have numerous equipments running as HTTP web servers behind NAT. When some demand gets here, you intend to onward it to among your web servers, right?
If you are making use of apache and also mod_rewrite, you could be able to draw it in this manner:
Most routers/firewalls permit to reroute website traffic based upon a particular port, as an example all SMTP website traffic (port 25) is rerouted to 192.168.1.1.
Yet if you have numerous web servers to manage your website traffic (1 web server per domain name). You require to install something like a reverse proxy (nginx sustains this for HTTP, IMAP, POP3).
As an example, all website traffic to port 80 is rerouted to
192.168.1.2 which runs nginx and also relying on the host name will certainly reroute to either
I have actually done something comparable making use of the ProxyPass instruction under mod_proxy in Apache.
First off, make use of Name-based Virtual Hosting to permit various domain names to be host various websites making use of the very same IP, after that for the domain names that linked to an inner webserver, you have a config thus:
# Within your VirtualHost definition ServerName somedomain.com ProxyPass / http://10.0.1.42/ ProxyPassReverse / http://10.0.1.42/
This will certainly cause all demands to
http://somedomain.com be transparently proxied to an inner website organized on
I was seeking the very same point a while earlier. Never ever navigated to do it yet below is what I though could function.
make use of the
mod_proxy component and also make use of the