Apache as Proxy

DNS Configuration

chlorine.lenya.org. IN A 194.191.122.217
calcium.lenya.org. IN A 194.191.122.220
ethz-mat.lenya.com. IN CNAME chlorine.lenya.com
unipublic.lenya.com. IN CNAME calcium.lenya.com

Build Apache with mod_proxy (or plus mod_rewrite)

./configure --prefix=/usr/local/apache --enable-module=proxy
(./configure --prefix=/usr/local/apache --enable-module=proxy --enable-module=rewrite)

More than one IP (not really necessary)

Add IP:
ifconfig eth0:0 194.191.122.217 broadcast 194.191.122.223 netmask 255.255.255.240 up
Add another IP:
ifconfig eth0:1 194.191.122.219 broadcast 194.191.122.223 netmask 255.255.255.240 up
Check Configuration:
ifconfig
ping 194.191.122.217
ping 194.191.122.219
Remove IP:
ifconfig eth0:0 down
ifconfig eth0:0- 0
Remove another IP:
ifconfig eth0:1 down
ifconfig eth0:1- 0
Check Configuration:
ifconfig
ping 194.191.122.217
ping 194.191.122.219

Apache configuration httpd.conf

NameVirtualHost 194.191.122.220
#NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
<VirtualHost 194.191.122.220>
  ServerName calcium.lenya.org
  DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
<VirtualHost 194.191.122.217>
  ServerName ethz-mat.lenya.org
  ProxyPass / http://194.191.122.220:8080/lenya/ethz-mat/
  ProxyPassReverse / http://194.191.122.220:8080/lenya/ethz-mat/
</VirtualHost>
<VirtualHost 194.191.122.220>
  ServerName unipublic.lenya.org
  ProxyPass / http://194.191.122.220:8080/lenya/oscom/live/index.html
  ProxyPassReverse / http://194.191.122.220:8080/lenya/oscom/live/index.html
</VirtualHost>

Lenya Configuration

org/apache/lenya/cocoon/acting/AbstractAuthorizerAction.java
stylesheets/lenya/ac/login-screen.xsl

Related Content

Serving Zope Virtual Hosts using Apache