I'm trying to run Bottle.py with Apache and mod_wsgi.
I'm running it on windows, using a xampp. python v2.7
My Apache config in httpd:
<VirtualHost *>
ServerName example.com
WSGIScriptAlias / C:xampphtdocsGetXPathsProjectapp.wsgi
<Directory C:xampphtdocsGetXPathsProject>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
My app.wsgi code:
import os
os.chdir(os.path.dirname(__file__))
import bottle
application = bottle.default_app()
My hello.py:
from bottle import route
@route('/hello')
def hello():
return "Hello World!"
When I go to localhost/hello
I get a 404 error.
I don't have any other errors on the Apache log file, probably missing something basic.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…