[Setup] Apache2 rewrite problems

Ollie Acheson oacheson at acheson.org
Sat Feb 11 14:12:13 UTC 2006

I am a new zope and plone user. My configuration is linux 2, python 2.4.2,
zope 2.9.0 and plone 2.1.2. Zope and plone appear to be working fine when
accessed through port 8080. My problem relates to using apache2 and rewrite
rules to access virtual domains via port 80, i.e., no port as part of the

My domain is www.gacheson.org. I can access zope via www.gacheson.org:8080
and plone via www.gacheson.org:8080/ga. I want to be able to access either
without the :8080 by using rewrite. However, using various rewrite rules
from the plone docs, as well as many other sites, I always end up with a 403
Forbidden error (You don't have permissions to access /ga on this server.).

I have attached (below) the apache2 config file as well as the rewrite-log for an
attempt to get www.gacheson.org/ga. That attempt, like all others without
the :8080 ended with the 403 error described above. If I add the :8080 to
the url, the attempt is successful and, by the way, leads to no entry in the
rewrite log.

Finally, the apache error log for this virtual domain shows:

[Sat Feb 11 09:04:10 2006] [error] [client] client denied by
server configuration:

I feel I'm almost there, but the solution is eluding me. Any help would be


---------------- begin apache2 config file ---------------------------
# name based virtual hosting

<VirtualHost *>
    ServerName www.gacheson.org
    ServerAlias gacheson.org
    ErrorLog /var/log/apache2/gacheson-www.error.log
    CustomLog /var/log/apache2/gacheson-www.log combined
    LogLevel warn
    ServerSignature On
# added per plone instructions

 <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteLog "/var/log/apache2/rewrite_log"
    RewriteLogLevel 5

    RewriteRule ^/(.*) \
	http://localhost:8080/VirtualHostBase/http/www.gacheson.org:80/ga/VirtualHostRoot/$1 [L,P]


 <IfModule mod_proxy.c>
    ProxyVia On
    <LocationMatch "^[^/]">
        Deny from all

-------------------------- end apache2 config file --------------------

---------------------------- begin rewrite log file -------------------- - - [11/Feb/2006:08:24:53 --0500] [www.gacheson.org/sid#81d7cc0][rid#83f15a8/initial] (2) init rewrite engine with requested uri /ga - - [11/Feb/2006:08:24:53 --0500] [www.gacheson.org/sid#81d7cc0][rid#83f15a8/initial] (3) applying pattern '^/(.*)' to uri '/ga' - - [11/Feb/2006:08:24:53 --0500] [www.gacheson.org/sid#81d7cc0][rid#83f15a8/initial] (2) rewrite /ga -> http://localhost:8080/VirtualHostBase/http/www.gacheson.org:80/ga/VirtualHostRoot/ga - - [11/Feb/2006:08:24:53 --0500] [www.gacheson.org/sid#81d7cc0][rid#83f15a8/initial] (2) forcing proxy-throughput with http://localhost:8080/VirtualHostBase/http/www.gacheson.org:80/ga/VirtualHostRoot/ga - - [11/Feb/2006:08:24:53 --0500] [www.gacheson.org/sid#81d7cc0][rid#83f15a8/initial] (1) go-ahead with proxy request proxy:http://localhost:8080/VirtualHostBase/http/www.gacheson.org:80/ga/VirtualHostRoot/ga [OK]
----------------------------- end rewrite log file --------------------------

| Ollie Acheson             |
| Morristown, NJ            |

More information about the Setup mailing list