我正在尝试将 mod_wsgi 配置为使用简单的 web.py python 脚本。我跟着这本食谱:http ://webpy.org/cookbook/mod_wsgi-apache
每次我去https://<server>/appname/
铬说Internal Server Error
这是我的配置详细信息:
在 httpd.conf 我有
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /appname /var/www/webpy-app/cody.py/
Alias /appname /var/www/webpy-app/static/
AddType text/html .py
<Directory /var/www/webpy-app/>
Order deny,allow
Allow from all
</Directory>
<Location /appname>
AuthType Basic
AuthName "Authenication Required"
AuthUserFile "/etc/httpd/conf/some_sample_users"
</Location>
这是代码:
import web
urls = (
'/.*', 'hello',
)
class hello:
def GET(self):
return "Hello, world."
application = web.application(urls, globals()).wsgifunc()
我检查了错误日志,但在那里没有找到太多内容:
[Wed Oct 09 02:24:50 2013] [notice] caught SIGTERM, shutting down
[Wed Oct 09 02:24:55 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Wed Oct 09 02:24:55 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Oct 09 02:24:55 2013] [warn] module wsgi_module is already loaded, skipping
[Wed Oct 09 02:24:55 2013] [notice] Digest: generating secret for digest authentication ...
[Wed Oct 09 02:24:55 2013] [notice] Digest: done
[Wed Oct 09 02:24:55 2013] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.2 Python/2.6.6 DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
我需要进行哪些修改才能使其正常工作?