0
我使用uwsgi運行apache(mod_uwsgi)。在設置我有unix套接字指向/ var/uwsgi /。我也從apache vhost指向這個套接字。如果我試圖訪問這個虛擬主機,我得到錯誤(Apache日誌):uwsgi + apache + django
Apache日誌:
uwsgi: unable to connect to uWSGI server: Permission denied
uwsgi配置:
<uwsgi>
<pythonpath>/home/user/django_projects/project/</pythonpath>
<master/>
<no-orphans/>
<processes>1</processes>
<optimize>0</optimize>
<home>/home/user/Envs/project/</home>
<limit-as>128</limit-as>
<chmod-socket>664</chmod-socket>
<gid>www-data</gid>
<pidfile>/var/uwsgi/project.pid</pidfile>
<socket>/var/uwsgi/project.sock</socket>
<wsgi-file>/home/user/django_projects/project/deploy/wsgi-sites/production.py</wsgi-file>
<daemonize>/var/uwsgi/project.log</daemonize>
<chdir>/home/user/django_projects/project/</chdir>
</uwsgi>
和Apache的配置:
<Location />
Options FollowSymLinks Indexes
SetHandler uwsgi-handler
uWSGISocket /var/uwsgi/project.sock
</Location>
我在想什麼?我也嘗試更改chmod套接字到777 ..沒有成功..
可能你需要確保首先啓用apache模塊mod_uwsgi。 – drabo2005
好吧,現在我運行它通過tcp(如uWSGISocket 127.0.0.1:20000)和監督,所以必須離開.. –
Ruddy