mod_wsgi测试wsgi运行正常,应用程序提供HTTP 500

时间:2012-09-14 00:12:00

标签: python apache centos mod-wsgi flask

我正在尝试在运行CentOS 6.3的Apache服务器(2.2.15)上运行烧瓶应用程序(禁用SE linux)并使用mod_wsgi(从源安装3.3)来执行此操作。

我尝试了测试脚本here并返回HTTP 200但是当我将应用程序放在同一目录中并相应地调整httpd.conf时,我得到了一个HTTP 500。

以下是我/etc/httpd/conf/httpd.conf的相关部分:

LoadModule wsgi_module modules/mod_wsgi.so
WSGISocketPrefix /tmp/wsgi
<VirtualHost *:80>
#    ServerAdmin root@localhost
    DocumentRoot /var/www/html/
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
     ServerName XXXX.YYYYY.org
     WSGIDaemonProcess irbsite user=apache group=apache threads=5
     WSGIScriptAlias / /var/www/html/irbsite.wsgi

     <Directory />
    WSGIProcessGroup irbsite
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
    </Directory>

我有一个类似的应用程序在运行Debian 6的linode服务器上运行,它开箱即用。

编辑:检查错误日志会显示脚本被调用:

[Thu Sep 13 17:24:45 2012] [info] mod_wsgi (pid=6223): Attach interpreter ''.
[Thu Sep 13 17:24:45 2012] [info] mod_wsgi (pid=6228): Attach interpreter ''.
[Thu Sep 13 17:24:45 2012] [info] mod_wsgi (pid=6229): Attach interpreter ''.
[Thu Sep 13 17:24:45 2012] [info] mod_wsgi (pid=6230): Attach interpreter ''.
[Thu Sep 13 17:24:45 2012] [info] mod_wsgi (pid=6231): Attach interpreter ''.
[Thu Sep 13 17:24:47 2012] [info] [client 140.107.134.36] mod_wsgi (pid=6223, process='irbsite', application=''): Loading WSGI script '/var/www/html/irbsite.wsgi'.

我不确定下一步该尝试什么。

0 个答案:

没有答案