I am trying to run CherryPy for Apache using mod_rewrite as described in the CherryPy documentation ( BehindApache , ModRewrite ) and it does not work.
Edit: Earlier, my description of this problem was somewhat inaccurate. It seems I forgot to restart Apache during some of my attempts. I have significantly revised the question.
When I run my program (a very simple hello world program, similar to the first training file that comes with CherryPy), it works fine. If I run curl "http://127.0.0.1:8080"from my server, I will see the output, and I see its entry in the CherryPy log.
However, if I try to access the site from my browser, I get a 403 Forbidden error saying: "You do not have permission to access this server." I do not see any CherryPy journal entries. I tried putting RewriteRule ( ) in the corresponding VirtualHost section of my httpd.conf file, both with a slash and without it, and both times I got the same error. In my Apache error log, I see lines like this:RewriteRule ^(.*) http://127.0.0.1:8080$1 [proxy]
[Mon Sep 27 15:54:11 2010] [error] [client 123.45.67.89] trying to make a remote request from mod_rewrite without a proxy server: proxy: http://127.0.0.1: 8080 /
I tried putting the RewriteRule in the .htaccess file of my site, and I got 404 Not Found errors, with the following lines in my error log:
[ 27 13:31:54 2010] [] [ 123.45.67.89] : : http://127.0.0.1: 8080/
CherryPy.
, , CherryPy, . Apache CherryPy, httpd.conf , .htaccess.
- , , ? , . DreamHost Debian 4.3.2-1.1, Apache 2.2.15, Python 2.6.5 CherryPy 3.1.2.
2: lazy1, , . 403 .