sandy's blog


Routing and Apache Gateways

I switched my broken Linksys router from NAT Gateway to Router and back again, and now I can connect through it to machines on my subnet. Hmmm... Maybe I won't need to replace it after all. Now to blog how I set up routing to my Apache servers with private IP addresses on that subnet... I have a machine ( with a public IP address ( running an Apache server. This machine acts as a gateway to the other servers. I have a NAT Gateway ( on the same subnet as the Apache gateway server which has got various ports set up to forward to port 80 on each web server on the private network. Setting this up depends on which router you use. If the Apache gateway machine is running Linux (or any other Unix-like system), you could make it do the routing to the private network too. The Apache gateway server has had entries like this added to its apache2.conf file: <VirtualHost *:80> ServerName ProxyPass / </VirtualHost> And make sure these lines aren't commented out: LoadModule proxy_module modules/ LoadModule proxy_connect_module modules/ LoadModule proxy_http_module modules/ And finally, I have DNS set up so that a host name points at the Apache gateway server for each machine behind the NAT gateway. The host has IP address, and points at (the gateway server). The above virtual host directive in the Apache config tells apache to redirect requests with this hostname to port 84 on the NAT router. The NAT router then forwards the request to where a web server will server up a web page. A side-effect of this setup is that Netcraft now things the server's OS is Linux and it's running Apache on Darwin. I'm sure some fun could be had with this type of setup with a Microsoft/IIS host behind the gateway.


Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home