i am trying to get mod_rewrite work with mod_wsgi.  however the
rewrite seems to work according the log but then WSGIScriptAlias did
catch it.

when i have this config in apache

WSGISocketPrefix /private/var/run/wsgi
WSGIDaemonProcess devel user=www group=www home=/var/www/devel/
inactivity-timeout=60
<VirtualHost *:80>
RewriteEngine on
RewriteLogLevel 9
RewriteLog "/var/log/apache2/rewrite.log"
RewriteRule   ^/test/(.*)  /test/ok/$1  [E=PATH_INFO:ok]
WSGIScriptAlias /test /var/www/devel/testwsgi.py
WSGIProcessGroup devel
</VirtualHost>

rewrite log shows:
(2) init rewrite engine with requested uri /test/
(3) applying pattern '^/test/(.*)' to uri '/test/'
 (2) rewrite '/test/' -> '/test/ok/'
(5) setting env variable 'PATH_INFO' to 'ok'
(2) local path result: /test/ok/
(2) prefixed with document_root to /usr/htdocs/test/ok/
(1) go-ahead with /usr/htdocs/test/ok/ [OK]

WSGIScriptAlias didn't match the /test and apache just serve the html
files. if i remove the rewrite the wsgi works.

i then tried

WSGISocketPrefix /private/var/run/wsgi
WSGIDaemonProcess devel user=www group=www home=/var/www/devel/
inactivity-timeout=60
<VirtualHost *:80>
RewriteEngine on
RewriteLogLevel 9
RewriteLog "/var/log/apache2/rewrite.log"
#RewriteRule   ^/test/(.*)  /test/ok/$1  [E=PATH_INFO:ok]
RewriteRule   . -   [E=PATH_INFO:ok]

WSGIScriptAlias /test /var/www/devel/testwsgi.py
WSGIProcessGroup devel
</VirtualHost>

http://localhost/test

rewrite.log
(2) init rewrite engine with requested uri /
(3) applying pattern '.' to uri '/'
(5) setting env variable 'PATH_INFO' to '/ok'
 (1) pass through /

this time WSGI works but then PATH_INFO still remain "/" in the WSGI
application via enviorn["PATH_INFO']


actually what i want to do is just a
WSGIScriptAlias /test /var/www/devel/testwsgi.py
and want the PATH_INFO remain unchanged in testwsgi.py. that is still
"/test"

can anyone show me some lights?

thanks in advance
-vince

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to