Running Plone and Zope behind an Apache 2 web server
This Tutorial applies to:
Any version.
This Tutorial is intended for:
Server Administrators
tiran
All content on one page (useful for printing, presentation mode etc.)
- Preface and Apache 2 module configuration This tutorial describes how to set up an Apache 2 webserver as proxy with disk caching and deflating (compressing like mod_gzip) for Zope under Debian Testing. It may or may not be working with other distributions. Please send me feedback.
- Zope configuration Next up is making sure your Zope server is configured correctly.
- Apache 2 virtual host Then it's time to set up the Apache VirtualHost.
- How VHM works The Virtual Host Monster adds some magic to the traversal process of Zope. Two special keywords are added (VirtualHostBase and VirtualHostRoot) which allows you to configure the virtual host and the base folder inside your Zope instance.
- FastCGI for Apache2 How to compile mod_fastcgi for Apache 2 under Debian.
- mod_proxy vs. mod_ssl vars How to access the mod_ssl vars.
- Appendix
Plone instance as a subdirectory
What is the RewriteRule to enable running a plone instance as a subdirectory of a site run by Apache?
Two problems
First, if I change something in zope site and click Save, "Method Not Allowed The requested method POST is not allowed for the URL /plone/... Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e Server at ... Port 443" appears, but if i go back and click again, then it makes the save.
The second problem is, simple reload doesn't work, it reloads only using reload everything (CTRL+SHIFT+R ).
Apache2 virtual host config examples
Please pardon me if any of these are dumb comments/questions. I'm new to Zope, Plone, and Apache.
- It seems clear that section 3 of your tutorial (Apache 2 virtual host) contains four separate example configuration files for Apache (separate meaning that they are meant to be used one at a time in isolation from each other, not in any sort of combination with each other). I think I have Apache set up properly in all respects (many tests seem to confirm this thinking), and when I use your first example config file (Entitled: A very easy example) listed here, the rewrite rule seems to function as expected, and I'm redirected to Plone for the desired URL (www.example.org) whereas other virtual hosts served up by my server are directed to their static pages as expected. Similarly, when I replace that config file with the second one (A virtual host serving zope), I get expected behavior when going to example.org. For the third config file (Additional rewrite rules) Apache complained about a syntax error in the rewrite rule that I finally figured out was the space after the comma here: [R=301, L], so in case that's not obvious to anyone, remove the space.
But I'm not sure what you're trying to do/show with the other two example config files. I'm also not sure what you're trying to do with the https part of the second config file, rewriting ^/(.)/manage(.) to https://secure.example.org. Isn't there something missing here? Where does zope get invoked in the https part of the last two example config files, and in the https rewrite rule of the second example config file? Unless I'm missing something, I also need some other configuration to get zope called. If I'm missing something, could you elaborate?
Apache Access Logs
beren
Apache2 and Windows
I have still Problems to get the Apache running with Windows. Does somebody have perhaps experiences with Apache and Plone on an Windows-Server? I've tried to configure the Apache as written in the tutorial, but I always geht an failure "The Apache service named reported the following error: >>> Invalid command 'CustomLog', perhaps misspelled or defined by a module not included in the server configuration" or "The Apache service named reported the following error:>>> [Mon Jul 23 10:02:46 2007] [warn] NameVirtualHost *:0 has no VirtualHosts.
"
Apache2.2: CacheSize
ProxyVia On
because of a different handling of Proxy modules (there are some more than just proxy.load
running the VirtualHost under the directive of "ProxyVia On" returned a 403 error,
I was taking the directive to change to:
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
# prevent the webserver from beeing used as proxy
<LocationMatch "^[^/]">
Deny from all
</LocationMatch>
These are to be put in the config files under sites-enabled, just like the other directives you described in your Apache setup
Apache 2.2.6 configuration
I followed all the instructions to configure plone/zope with apache2 (i am using apache2 version 2.2.6). It works fine except in some circumstances (when I change the state of a document from the content view of a folder) where a "Bad Gateway" occurred. Any suggestions? Best regards.
remove access rules from Zope root
If accessRule.py (Plone Access Rule) exists in the root, it needs to be deleted/removed in order for the Apache RewriteRule to work.