开发者

site.addsitedir not fully processing .pth file

This is a apache/mod_wsgi/virtualenv/django stack. In the virtualenv site-packages dir I've got a virtualenv_path_extensions.pth file. The apache conf has a

WSGIScriptAlias / /path/to/my.wsgi

my.wsgi has

site.addsitedir('/path/to/virtualenv/site-packages')

Now, if I start up a python shell, import site, and call the line above, my sys.path looks correct : it has loaded all the paths in the virtualenv_path_extensions.pth

However, Under apache I'm getting 500 errors because it claims django is not on the path. When I log sys.path after th开发者_开发问答e addsitedir line in my.wsgi, it looks as if it has added the first line of virtualenv_path_extensions.pth, but not the rest!

What might cause that?


Ah, selinux :D

The paths that were not getting loaded had the wrong context, and apache wasn't able to touch them ...

** must remember to check those selinux logs when mysteries arise **

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜