Linux-VServer The Best Way to provide Virtual Dedicated Servers on Linux #8

More of Single IP Issue

If you want to have multiple vservers runing apache, you can setup a web gateway, and use apache's rewrite or proxy module for reverse proxy, you can also use squid for doing this, but I have never tried.

Here is an example for using apache for proxy:

rules:
AllowWeb	net     fw
DNAT    	net     dmz:10.0.0.254   tcp     http    -       140.109.13.50
DNAT    	net     dmz:10.0.0.254   tcp     https   -       140.109.13.50
Note: 10.0.0.254 is the web gateway(For proxy apache on other vserver).

Added hostname mapping into /etc/hosts on the web gateway

10.0.0.1	people.linux.org.tw	people

Added a virtual host which does proxy to apache:

<VirtualHost *>
    ServerName people.linux.org.tw
    DocumentRoot /var/www/people.linux.org.tw
    CustomLog /var/log/apache2/people.linux.org.tw-access.log combined
    ErrorLog /var/log/apache2/people.linux.org.tw-error.log

    ProxyRequests off
    ProxyPass / http://people.linux.org.tw:80/
    <Proxy http://people.linux.org.tw>
        Order deny,allow
        Allow from all
    </Proxy>
</VirtualHost>
Copyright © 2005 Taiwan Debian Users Group