1
我正嘗試在Lion中使用Nginx + Gunicorn和Supervisor設置Django。 我已經安裝:如何在Gunicorn和Nginx上配置Django(Mac OS X)
進展:MySQL的DMG + MySQLdb的編譯+的Python +釀造的nginx +的easy_install gunicorn +畫中畫安裝Django + easy_install的主管。
當前配置的詳細信息:
Nginx:
upstream app_server {
server unix:/tmp/gunicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
#Static
root /Users/andre/sites;
location/{
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://app_server;
break;
}
}
Gunicorn:你可以看到Here
Supervisor:
[program:gunicorn]
command=/usr/local/bin/gunicorn main:application -c /Users/devepy/desktop/andre/andre/gunicorn.conf.py
directory=/Users/andre/desktop/andre/myproject
user=nobody
autostart=true
autorestart=true
redirect_stderr=True
其實我不知道自己能做什麼,但花了數週努力學習的Mac OSX是瘋。
它需要使它工作? – user1376211
有什麼問題? – jpic