我知道如何安装Python Bottle服务器:
import os
from bottle import route, template, default_app
os.chdir(os.path.dirname(__file__))
@route('/hello')
def hello():
return template('Hello world')
application = default_app()
使用WSGI运行,并使用Apache这样配置:
<VirtualHost *:80>
ServerName example.com
<Directory />
AllowOverride All
Require all granted
</Directory>
WSGIScriptAlias / /var/www/wsgi_test/app.wsgi
</VirtualHost>
是否可以直接在.htaccess
中进行WSGI配置?]
我知道如何拥有一个Python瓶服务器:从瓶导入路径,模板,default_app导入os。os.chdir(os.path.dirname(__ file__))@route('/ hello')def hello():返回模板('Hello ...
我刚刚找到了doc,可悲的是,答案似乎是否定的: