开发者

URL is appended to WSGI script's path, why?

开发者 https://www.devze.com 2023-01-13 02:23 出处:网络
I have a development server set up running Apache 2.2 with mod_wsgi. I have a test project and a webapp in development setup, and they half work. When I attempt to access something other than the proj

I have a development server set up running Apache 2.2 with mod_wsgi. I have a test project and a webapp in development setup, and they half work. When I attempt to access something other than the project's landing page, Apache appends the rest of the URL onto the path of the WSGI scr开发者_开发知识库ipt and won't load the page.

In httpd.conf:

WSGIScriptAplias /dubserv/ /home/sli/www/dubserv.wsgi
<Directory /home/sli/www/dubserv>
    Order deny,allow
    Allow from all
</Directory>

When accessing something other than the landing page for the app, this is the result (in this case, /login/):

[Tue Aug 24 12:38:44 2010] [error] [client 192.168.1.100] Target WSGI script not found or unable to stat: /home/sli/www/dubserv.wsgilogin

The result is the same if I put the WSGI script in anywhere under the project's root.


Use /dubserv and not /dubserv/ with WSGIScriptAlias. The instructions shouldn't show a trailing slash and so one should not be included.

0

精彩评论

暂无评论...
验证码 换一张
取 消