【发布时间】:2013-07-14 17:19:57
【问题描述】:
我正在尝试使用 Apache 和 mod_wsgi 运行 Bottle.py。
我在 Windows 上运行它,使用 xampp。蟒蛇v2.7
我在 httpd 中的 Apache 配置:
<VirtualHost *>
ServerName example.com
WSGIScriptAlias / C:\xampp\htdocs\GetXPathsProject\app.wsgi
<Directory C:\xampp\htdocs\GetXPathsProject>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
我的 app.wsgi 代码:
import os
os.chdir(os.path.dirname(__file__))
import bottle
application = bottle.default_app()
我的hello.py:
from bottle import route
@route('/hello')
def hello():
return "Hello World!"
当我转到 localhost/hello 时,我收到 404 错误。
我在 Apache 日志文件上没有任何其他错误,可能缺少一些基本内容。
【问题讨论】:
-
遇到同样的问题 =\
标签: python apache mod-wsgi bottle