Hi All, I have just set up a new apache server (Mandrake 10) and have configured it to use the following rewrite rule. -------------- <IfModule mod_rewrite.c> RewriteEngine On RewriteLog logs/domain.com-rewrite_log RewriteLogLevel 1 RewriteRule ^/(.*) http://zope.domain.com:8080/VirtualHostBase/http/%{SERVER_NAME}:80/domai n/VirtualHostRoot/$1 [L,P] </IfModule> ---------------- But when ever I go to domain.com I get a 403 error (You don't have permission to access / on this server). Does anyone know whats wrong? Thanks -tim zegir
Tim Zegir escribió:
Hi All,
I have just set up a new apache server (Mandrake 10) and have configured it to use the following rewrite rule. -------------- <IfModule mod_rewrite.c> RewriteEngine On RewriteLog logs/domain.com-rewrite_log RewriteLogLevel 1 RewriteRule ^/(.*) http://zope.domain.com:8080/VirtualHostBase/http/%{SERVER_NAME}:80/domai n/VirtualHostRoot/$1 [L,P] </IfModule> ---------------- But when ever I go to domain.com I get a 403 error (You don't have permission to access / on this server).
Does anyone know whats wrong?
You need to load mod_proxy and enable it using "ProxyRequests On". For security reasons, I always put all these directives in a <VirtualHost> section. Otherwise somebody can use your proxy-enabled apache to hide porno webs and consume you bandwidth. Regards Santi Camps
On Mon, Apr 19, 2004 at 08:19:08AM +0000, Santi Camps wrote:
Tim Zegir escribi?:
Hi All,
I have just set up a new apache server (Mandrake 10) and have configured it to use the following rewrite rule. -------------- <IfModule mod_rewrite.c> RewriteEngine On RewriteLog logs/domain.com-rewrite_log RewriteLogLevel 1 RewriteRule ^/(.*) http://zope.domain.com:8080/VirtualHostBase/http/%{SERVER_NAME}:80/domai n/VirtualHostRoot/$1 [L,P] </IfModule> ---------------- But when ever I go to domain.com I get a 403 error (You don't have permission to access / on this server).
Does anyone know whats wrong?
You need to load mod_proxy and enable it using "ProxyRequests On".
I'm certainly no Apache config expert, but that's not what the docs say. http://httpd.apache.org/docs/mod/mod_proxy.html "The forward proxy is activated using the ProxyRequests directive." ... "A reverse proxy is activated using the ProxyPass directive or the [P] flag to the RewriteRule directive. It is not necessary to turn ProxyRequests on in order to configure a reverse proxy." Sorry I don't know what the 403 problem is for Tim. If it were me, I'd look at the rewrite log and first be sure that the rewrite rule is doing what I expect. Maybe turn up the RewriteLogLevel a bit. -- Paul Winkler http://www.slinkp.com
Ok this is the last two requests from my rewrite log. ------------------------ init rewrite engine with requested uri / applying pattern '^/(.*)' to uri '/' rewrite / -> http://zope.domain.com:8080/VirtualHostBase/http/domain.com:80/domain/Vi rtualHostRoot/ forcing proxy-throughput with http://zope.domain.com:8080/VirtualHostBase/http/domain.com:80/domain/Vi rtualHostRoot/ go-ahead with proxy request proxy:http://zope.domain.com:8080/VirtualHostBase/http/domain.com:80/dom ain/VirtualHostRoot/ [OK] init rewrite engine with requested uri / applying pattern '^/(.*)' to uri '/' rewrite / -> http://zope.domain.com:8080/VirtualHostBase/http/domain.com:80/domain/Vi rtualHostRoot/ forcing proxy-throughput with http://zope.domain.com:8080/VirtualHostBase/http/domain.com:80/domain/Vi rtualHostRoot/ go-ahead with proxy request proxy:http://zope.domain.com/VirtualHostBase/http/domain.com:80/domain/V irtualHostRoot/ [OK] ---------------------- which doesn't tell me much (this is after I have raised the RewriteLogLevel to 9) thanks -tim zegir
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Paul Winkler Sent: Monday, April 19, 2004 4:34 PM To: zope@zope.org Subject: Re: [Zope] 403 error
On Mon, Apr 19, 2004 at 08:19:08AM +0000, Santi Camps wrote:
Tim Zegir escribi?:
Hi All,
I have just set up a new apache server (Mandrake 10) and have configured it to use the following rewrite rule. -------------- <IfModule mod_rewrite.c> RewriteEngine On RewriteLog logs/domain.com-rewrite_log RewriteLogLevel 1 RewriteRule ^/(.*)
http://zope.domain.com:8080/VirtualHostBase/http/%{SERVER_NAME}:80/doma i
n/VirtualHostRoot/$1 [L,P] </IfModule> ---------------- But when ever I go to domain.com I get a 403 error (You don't have permission to access / on this server).
Does anyone know whats wrong?
You need to load mod_proxy and enable it using "ProxyRequests On".
I'm certainly no Apache config expert, but that's not what the docs say.
http://httpd.apache.org/docs/mod/mod_proxy.html "The forward proxy is activated using the ProxyRequests directive." ... "A reverse proxy is activated using the ProxyPass directive or the [P] flag to the RewriteRule directive. It is not necessary to turn ProxyRequests on in order to configure a reverse proxy."
Sorry I don't know what the 403 problem is for Tim. If it were me, I'd look at the rewrite log and first be sure that the rewrite rule is doing what I expect. Maybe turn up the RewriteLogLevel a bit.
--
Paul Winkler http://www.slinkp.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Thanks for that but no luck :(. (See comments below)
-----Original Message----- From: Santi Camps [mailto:santi@zetadb.com] Sent: Monday, April 19, 2004 6:19 PM To: Tim Zegir Cc: zope@zope.org Subject: Re: [Zope] 403 error
Tim Zegir escribió:
Hi All,
I have just set up a new apache server (Mandrake 10) and have configured it to use the following rewrite rule.
It has Apache 2 if anyone is interested
-------------- <IfModule mod_rewrite.c> RewriteEngine On RewriteLog logs/domain.com-rewrite_log RewriteLogLevel 1 RewriteRule ^/(.*)
http://zope.domain.com:8080/VirtualHostBase/http/%{SERVER_NAME}:80/doma i
n/VirtualHostRoot/$1 [L,P] </IfModule> ---------------- But when ever I go to domain.com I get a 403 error (You don't have permission to access / on this server).
Does anyone know whats wrong?
You need to load mod_proxy and enable it using "ProxyRequests On".
When I do this I get the following error -------- Invalid command 'ProxyRequests', perhaps mis-spelled or defined by a module not included in the server configuration ------- Im positive that I have both mod_proxy and mod_rewrite installed (they are loaded in the httpd.conf)
For security reasons, I always put all these directives in a <VirtualHost> section. Otherwise somebody can use your proxy-enabled apache to hide porno webs and consume you bandwidth.
It already is in a <VirtualHost> :)
Regards
Santi Camps
Thanks -tim zegir
Yes! Thank you it now works!! All though when I go to domain.com it goes to domain.com/domain/index_html which looks like a problem with my rewrite rule to me. Thank you all -tim zegir -----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Aitzol Naberan Burgaña Sent: Monday, April 19, 2004 4:49 PM To: zope@zope.org Subject: Re: [Zope] 403 error Hi all, I had the same problem and I solve it activating the reverse proxy, add this code in your VirtualHost config: <IfModule mod_proxy.c> ProxyVia On ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> </IfModule> It works for me. Good Luck. Aitzol Naberan Burgaña CodeSyntax anaberan@codesyntax.com www.codesyntax.com Tel: 943 82 17 80 Tim Zegir(e)k dio: Thanks for that but no luck :(. (See comments below) -----Original Message----- From: Santi Camps [mailto:santi@zetadb.com] Sent: Monday, April 19, 2004 6:19 PM To: Tim Zegir Cc: zope@zope.org Subject: Re: [Zope] 403 error Tim Zegir escribió: Hi All, I have just set up a new apache server (Mandrake 10) and have configured it to use the following rewrite rule. It has Apache 2 if anyone is interested -------------- <IfModule mod_rewrite.c> RewriteEngine On RewriteLog logs/domain.com-rewrite_log RewriteLogLevel 1 RewriteRule ^/(.*) http://zope.domain.com:8080/VirtualHostBase/http/%{SERVER_NAME <http://zope.domain.com:8080/VirtualHostBase/http/%25%7bSERVER_NAME> }:80/doma i n/VirtualHostRoot/$1 [L,P] </IfModule> ---------------- But when ever I go to domain.com I get a 403 error (You don't have permission to access / on this server). Does anyone know whats wrong? You need to load mod_proxy and enable it using "ProxyRequests On". When I do this I get the following error -------- Invalid command 'ProxyRequests', perhaps mis-spelled or defined by a module not included in the server configuration ------- Im positive that I have both mod_proxy and mod_rewrite installed (they are loaded in the httpd.conf) For security reasons, I always put all these directives in a <VirtualHost> section. Otherwise somebody can use your proxy-enabled apache to hide porno webs and consume you bandwidth. It already is in a <VirtualHost> :) Regards Santi Camps Thanks -tim zegir _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Aitzol Naberan Burgaña -
Paul Winkler -
Santi Camps -
Tim Zegir