Skip to content

Metabolomics Fiehn Lab

Sections
Personal tools
You are here: Home » Members » Martin Scholz » Development » Zope and Plone » plone instances behind an apache

plone instances behind an apache

Document Actions
How to manage the forwarding of plone instances behind an apache webserver.

I dont want to write another Article about the setup of several plone instances behind an apache webserver, but there are still a few comments, that I want to write down.

Step one is the installation of apache and zope (can be found everywhere)

The main step is the configuration of the rewriting module in the virtual server.

My first problem was the fact that the mod_rewrite module was not even activated, which ment that there was an errormessage like the one below:

Links:Syntax error on line 4 of /etc/apache2/vhosts.d/test_forwarging.conf:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration

Links:Syntax error on line 4 of /etc/apache2/vhosts.d/test_forwarging.conf:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration

 

Acivate the module by editing the APACHE_MODULES in the file /etc/sysconfig/apache2 - just add rewrite to the line and it ll work. Dont forget the /etc/init.d/apache2 restart after that.

Next step would be to find the correct redirection.

RewriteEngine On
RewriteRule ^/(.*) http://128.120.1xx.xxx:8180/$1

works. while the following rule discribed by everybody does not work - it sais that I does not have enough rights to access this page.

RewriteEngine On
RewriteRule ^/(.*) http://128.120.1xx.xxx:8180/$1 [L,P]


I'll come back to that problem later - lets figure out how to set up the zope instance for the forwarding.

The virutal host monster:

I took an existing plone site to the new server and added a virtual host monster to it. Name of the existing site is museum so it can be reached from http://128.120.1xx.xxx:8180/museum

Next step is to modify the rewrite rule in apache that it can be access by http://128.120.1xx.xxx:2222/
The rule is
http://128.120.1xx.xxx:8180//VirtualHostBase/http/128.120.1xx.xxx:2222/museum/VirtualHostRoot/$1 [L,P]

http://128.120.1xx.xxx:8180//VirtualHostBase/http/128.120.1xx.xxx:2222/museum/VirtualHostRoot/$1 works fine but when the L and P options are activated the server sais I dont have any access to the page. Same problem as at the top.

the log said:
[Thu Aug 04 23:57:45 2005] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
[Thu Aug 04 23:57:45 2005] [warn] proxy: No protocol handler was valid for the URL /error/HTTP_FORBIDDEN.html.var. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

so checking he Proxy - and what I found was the final error:

all subpackages must be included in the apache installation - everything that includes the word proxy

so my included list is now:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation rewrite setenvif ssl suexec userdir php4 proxy proxy_connect proxy_ftp proxy_http"


Conclusion:

Apache: You need the mod_rewrite and ALL proxys (proxy proxy_connect proxy_ftp proxy_http)

Rewrite in Apache is quiet simple:

CustomLog     /var/log/apache2/museum-access.log combined
ErrorLog      /var/log/apache2/museum-error.log
LogLevel warn

RewriteEngine On
RewriteRule ^/(.*) http://128.120.1xx.xxx:8180//VirtualHostBase/http/128.120.1xx.xxx:2222/museum/VirtualHostRoot/$1 [L,P]

That is it ...

Martin


http://plone.org/documentation/tutorial/plone-apache/virtualhost
http://www.zope.org/Members/nemeth/howtos/zopeandapacherh61
http://www.zope.org/Members/regebro/Zope_and_Apache

http://zopewiki.org/ZopeAndApache

Created by zwluxx
Last modified 2005-08-05 02:31 PM
 

Powered by Plone

This site conforms to the following standards: