我在Ubuntu上遇到Apache / wsgi问题。我正在尝试为django网站提供服务。 我已经在SO和其他网站上阅读了所有相同的问题,但我真的无法修复它。
我遇到了与其他成员相同的问题。 2到3分钟后,请求以500错误结束,日志告诉我:在返回标题之前脚本超时 - wsgi.py。
权利还可以,Apache 2.4.7,libapache2-mod-wsgi 4ubuntu2.1.14.04.2。
启用的mod列表:
这是我的虚拟主机
<VirtualHost *:80>
ServerAdmin info@rescuecode.fr
ServerName fiches.rescuecode.fr
DocumentRoot /home/repos/git/rescuecode-fiches
WSGIDaemonProcess rescuecode-fiches python-path=/home/repos/git/rescuecode-fiches:/home/virtualenvs/rescuecode-fiches/lib/python2.7/site-packages processes=4 threads=25
WSGIProcessGroup rescuecode-fiches
WSGIScriptAlias / /home/repos/git/rescuecode-fiches/project/wsgi.py
WSGIApplicationGroup %{GLOBAL}
Alias /static /home/repos/git/rescuecode-fiches/project/static/
<Directory /home/repos/git/rescuecode-fiches/project/static>
Require all granted
</Directory>
Alias /site_media /home/repos/git/rescuecode-fiches/project/site_media/
<Directory /home/repos/git/rescuecode-fiches/project/site_media>
Require all granted
</Directory>
<Directory /home/repos/git/rescuecode-fiches/project>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Loglevel warn
ErrorLog /var/log/apache2/fiches.rescuecode.fr-error.log
CustomLog /var/log/apache2/fiches.rescuecode.fr-access.log combined
ServerSignature Off
有人能告诉我我哪里错了吗?
谢谢!
答案 0 :(得分:1)
谢谢Graham Dumpleton !!
我将此添加到Vhost:
WSGIDaemonProcess home=/home/repos
现在一切正常:)是目录问题!