开发者

MacOS + apache + mod_wsgi + django: what's a correct folder layout and permissions for web apps?

I'm testing django right now on Max OS X Snow Leopard Server. I have compiled mog_wsgi for build-in apache/python and enabled it in apache via LoadModule wsgi_module. I have also installed django via standard python setup.py install command. After that, i have created a test django application by named webtest in ~/Documents and enabled it in Apache via WS开发者_JAVA技巧GIScriptAlias / /Users/me/Documents/webtest/django.wsgi (django.wsgi is a file i have created manually).

As expected, nothing works with cryptic "access to /error/HTTP_FORBIDDEN.html.var denied" apache error. As google says, that is most probably reads like 'apache was not able to read script file'. Ok, i have changed sudo chmod -R 777 /Users (calm, it's a virtual PC :) - and all works just fine.

So, the question: what is a recommended folder structure for my django apps in described configuration and what permissions i need? 777 is not for production :)


0755 (directories) and 0644 (files) should be plenty, but under a user's home directory is not the normal place for a web app regardless. /srv is the new place to put them, but this isn't found in a standard OS X installation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜