无法访问mod_wsgi托管的python(bottle.py)应用

时间:2013-03-22 19:00:17

标签: python apache mod-wsgi bottle

这是我的问题:

我写了一个bottle.py应用程序并使用内部的bottle.py网络服务器在我的电脑上运行它。现在我想将我的应用程序上传到我的服务器,并希望用apache2 + mod_wsgi在那里运行它我创建了以下文件:

的/ etc / apache2的/启用的站点 - /的 000-默认

...  

WSGIDaemonProcess web user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias /dem /var/www/vhosts/test.de/rbdemo/app.wsgi
WSGIProcessGroup web

<Directory /var/www/vhosts/test.de/rbdemo>
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

/var/www/vhosts/test.de/rbdemo/的 app.wsgi

import sys, os

sys.path = ['/var/www/vhosts/test.de/rbdemo'] + sys.path
os.chdir(os.path.dirname(__file__))

from web import default_app # This loads your application

application = default_app()

在我的申请中:

/var/www/vhosts/test.de/rbdemo/的 web.py

from bottle import TEMPLATE_PATH, request, redirect, route, hook, run, default_app, jinja2_template as template, static_file

...

if __name__ == '__main__':
    run(reloader=True)

Apache LOG

Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Wed Mar 27 17:26:47 2013] [notice] child pid 10124 exit signal Aborted (6)
Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Wed Mar 27 17:29:13 2013] [notice] child pid 18003 exit signal Aborted (6)
Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Wed Mar 27 17:30:47 2013] [notice] child pid 10126 exit signal Aborted (6)
Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Wed Mar 27 17:32:32 2013] [notice] child pid 21774 exit signal Aborted (6)
Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Wed Mar 27 17:32:37 2013] [notice] child pid 21779 exit signal Aborted (6)
[Wed Mar 27 17:59:17 2013] [error] [client 118.139.160.196] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)

但如果我想访问我的应用程序(demo.test.de),我会收到403 Forbidden Error ......

任何想法?

谢谢。

0 个答案:

没有答案
相关问题