直接在Apache .htaccess中而不在VirtualHost中的Python WSGI处理程序

问题描述 投票:0回答:1

我知道如何安装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 ...

python .htaccess mod-wsgi wsgi bottle
1个回答
0
投票

我刚刚找到了doc,可悲的是,答案似乎是否定的:

© www.soinside.com 2019 - 2024. All rights reserved.