我正在使用 uwsgi 运行 apache (mod_uwsgi)。在设置中,我有指向 /var/uwsgi/ 的 unix 套接字。我也从 apache vhost 指向这个套接字。如果我尝试访问此虚拟主机,则会出现错误(在 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>
和阿帕奇配置:
<Location />
Options FollowSymLinks Indexes
SetHandler uwsgi-handler
uWSGISocket /var/uwsgi/project.sock
</Location>
我错过了什么?我还尝试将 chmod 套接字更改为 777 ..没有成功..