FrontPage
»
Setup_School_Servers
»
ApacheRules
# these are the rewrite and proxypass rules for the virtual apache servers:
ServerName your_server_name
ServerAdmin webmaster@your_server_name
DocumentRoot /var/www
RewriteEngine On
RewriteRule ^/mailman/ - [L] #a cgi program outside zope (or use the new ! ZMailman Product
RewriteRule ^/cgi-bin/ - [L] # allow cgi-bin programs to keep working
RewriteRule ^/icons/ - [L]
RewriteRule ^/imp/ - [L] # for the IMP webmail program
RewriteRule ^/doc/ - [L] # for debian package documentation
RewriteRule ^/servlets/ - [L] # for tomcat servlets
RewriteRule ^/img/ - [L] # for externally produced images
RewriteRule ^/web/ - [L] # the main apache root folder
RewriteRule ^/www/ - [L]
ProxyPass /another_server_name http://another_server:9673 # redirect to another computer's zope server
ProxyPassReverse /another_server http://another_server:9673 # these always go in pairs
ProxyPass /misc_ http://your_server_name:9673/misc_
ProxyPassReverse /misc_ http://your_server_name:9673/misc_ # for ZMI icons
ProxyPass /p_ http://your_server_name:9673/p_
ProxyPassReverse /p_ http://your_server_name:9673/p_ # for ZMI icons
ProxyPass /folder http://your_server_name/folder
ProxyPassReverse /folder http://your_server_name/folder # create an alias for a school community within the zope server
ProxyVia on
RewriteRule ^/(.*) http://127.0.0.1:9673/VirtualHostBase/http/%{HTTP_HOST}:80/$1 [L,P]
ProxyPassReverse ^/(.*) http://your_server_name/$1
Notes:
- Avoid using https: in favor of http: in ProxyPass rules; it will convert to https if you call the original with https; using https here caused my apache process to hang