Anyone know anything about configuring a reverse proxy? I want to set up a website that is basically a collection of third level domains under a
single URL, but I want to have a single box set up as public facing, that then each third level domains routes the traffic to a different IP address
and port in my local network.
So for example;
www.1.slimy.co.uk would route to http://192.168.0.1:80
www.2.slimy.co.uk would route to http://192.168.0.5:8080
www.3.slimy.co.uk would route to http://192.168.0.10:8888
with all domains routing to a single public facing address, and assume all HTTP traffic (despite the port changes).
Apologies if what I'm thinking about isn't possible, if I have to do it another way then I'd appreciate any input.
[Edited on 14/7/14 by Slimy38]
It can certainly be done. Most forward proxies will do it in reverse like this.
What are you going to use?
www.1.slimy.co.uk would route to http://192.168.0.1:80
www.2.slimy.co.uk would route to http://192.168.0.5:8080
www.3.slimy.co.uk would route to http://192.168.0.10:8888
Not sure why you are changing IP and port numbers for the inside addresses. One or the other.
You could do Port Address Translation or do Reverse Proxy
quote:
Originally posted by jeffw
www.1.slimy.co.uk would route to http://192.168.0.1:80
www.2.slimy.co.uk would route to http://192.168.0.5:8080
www.3.slimy.co.uk would route to http://192.168.0.10:8888
Not sure why you are changing IP and port numbers for the inside addresses. One or the other.
You could do Port Address Translation or do Reverse Proxy
was just going to post that Apache and mod_proxy is what you're looking for - once you get your head round the manual its really quite simple to use
It is just a matter of tying the listener Ports/addresses to the URLs, easy enough in F5 or Bluecoat, not done it in Apache for many years.
Apache/mod_proxy will do this for you. You'll need to enable name-based virtual hosting with:
code:
NameVirtualHost *:80
code:
<VirtualHost *:80>
ServerName www.1.slimy.co.uk
ProxyPass / http://192.168.0.1/
ProxyPassReverse / http://192.168.0.1/
CustomLog logs/www.1.slimy.co.uk-access.log combined
ErrorLog logs/www.1.slimy.co.uk-error.log
</VirtualHost>
<VirtualHost *:80>
ServerName www.2.slimy.co.uk
ProxyPass / http://192.168.0.5:8080/
ProxyPassReverse / http://192.168.0.5:8080/
CustomLog logs/www.2.slimy.co.uk-access.log combined
ErrorLog logs/www.2.slimy.co.uk-error.log
</VirtualHost>
Awesome! Now all I need to do is figure out how to do the same with UDP... turns out one of the apps uses UDP rather than TCP.
Mind that will only work for HTTP (and HTTPS), not any TCP application.
I assume it's not HTTP over UDP - is that even a thing?
[Edited on 16/7/14 by ironside]
You are going to have to do NATing and not reverse proxy.