Basically, we have one external IP address, several servers internally and want to redirect to each internal server based on request URL. We do not want to install another piece of hardware to do this for us but we have a firewall running Linux that currently forwards to only one of the internal servers. Example of our setup can be seen here: http://img23.imageshack.us/img23/5469/drawing1br.jpg NOTE: domain.com does not point to this box nor would we like it to. Subdomains are pointed manually to our global IP address.
Asked
Active
Viewed 2,090 times
2
-
2You want a reverse proxy. – Kyle Brandt Apr 22 '10 at 18:18
1 Answers
2
You could use varnish for this, install it on your firewall and use a config with several backends. Something like:
# a simple backend
backend b1 {
set backend.host = "10.1.2.100";
set backend.port = "http";
}
backend b2 {
set backend.host = "10.1.2.101";
set backend.port = "http";
}
backend b3 {
set backend.host = "10.1.2.102";
set backend.port = "http";
}
sub vcl_recv {
if (req.http.host ~ "^(www.)?example.com$") {
set req.backend = b1;
}
if (req.http.host ~ "^(www.)?example.org$") {
set req.backend = b2;
}
if (req.http.host ~ "^(www.)?example.net$") {
set req.backend = b3;
}
}

rkthkr
- 8,618
- 28
- 38
-
Thanks. Now just to get the RPM to install on RedHat 7.3 with an outdated GLIBC... – user41250 Apr 22 '10 at 20:36
-
-
-
Sadly no, but it's an excuse to remap the network and spend a weekend with IP addresses. – user41250 Apr 23 '10 at 14:24