Apache Public webserver with multiple local webserver with Debian
Posted by arisnb on May 18th, 2009
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Follow example network topology :
wbsvr-1,wbsvr-2,etc —–main-server(public)——–client-browser
wbsvr-1 is a local webserver 1, example http://192.168.1.1/tukang-nggame/
wbsvr-2 is a local webserver 2, example http://192.168.1.2/tukangnggame/ main-server(public) is main web server, exh http://www.example.com
client-browser is a browser how we browse our homepage (exp Mozilla Firefof, Opera, IE, Safari or the other )
In main-server use Apache web server and Isntall mod proxy-html. This command at console :
#apt-get install libapache2-mod-proxy-html
Enable that module (make link module) with command at console :
#ln -s /etc/apache2/mods-available/proxy_http.conf /etc/apache2/mods-enabled/proxy_html.conf
#ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_html.load
Edit configuration /etc/apache2/apache2.conf (main server)
<Location /tukang-nggame/ >
Order Deny,Allow
Allow from All
ProxyPass http://192.168.1.1/tukang-nggame/
ProxyPassReverse http://192.168.1.1/tukang-nggame/
< /Location >
<Location /tukangnggame/ >
Order Deny,Allow
Allow from All
ProxyPass http://192.168.1.2/tukangnggame/
ProxyPassReverse http://192.168.1.2/tukangnggame/
< /Location >
Restart apache server in main server with command at console.
#/etc/init.d/apache2 restart
Then browse from client-browser
http://192.168.1.1/tukang-nggame/ with url http://www.example.com/tukang-nggame/
http://192.168.1.1/tukangnggame/ with url http://www.example.com/tukangnggame/
Don’t forget last url with slash (/).


May 18th, 2009 at 9:23 am
That’s usually called a “Reverse proxy”.
June 2nd, 2009 at 1:59 pm
When you say:
#ln -s /etc/apache2/mods-available/proxy_http.conf /etc/apache2/mods-enabled/proxy_html.conf
#ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_html.load
You could just use this little command: a2enmod proxy_http
Use the debian way… It’ll simplify your work