1

这是我的问题:

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

/etc/apache2/sites-enabled/ 000-default

...  

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)

阿帕奇日志

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...

有任何想法吗 ?

谢谢你。

4

0 回答 0