【问题标题】:flask apache hosting - wsgi script shows loading but never returns烧瓶 apache 托管 - wsgi 脚本显示加载但从不返回
【发布时间】:2016-02-03 18:51:15
【问题描述】:

我们正在使用基于 mod-wsgi 的托管。 我已按照以下 URL 中给出的步骤进行操作:

http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/

编辑 1:最新网址: http://flask.pocoo.org/docs/1.0/deploying/mod_wsgi/

Apache 错误日志显示以下消息:

Loading WSGI script '/var/www/html/trunk/SPM/wsgi/flask.wsgi'

wsgi 文件如下所示:

import os
import sys
sys.stdout = sys.stderr
sys.path.insert(0,"/var/www/html/trunk/SPM")
from SPM.run import order as application

文件夹树结构如下:

|-- __init__.py
|-- order_manager
|   |-- __init__.py
|   |-- order_manager.wsgi
|   |-- views.py
|-- run.py
|-- wsgi
|   `-- flask.wsgi

谁能帮我解决这个问题?

【问题讨论】:

    标签: python apache flask


    【解决方案1】:

    这可能对某人有所帮助。 我通过更新我的/etc/apache2/conf-enabled/ormgr.conf 文件解决了这个问题

    <VirtualHost *:5000>
    
            ServerName 10.51.0.103
    
            WSGIDaemonProcess ormgr python-path=/var/www/html/trunk/SPM user=www-data group=www-data threads=5
            WSGIScriptAlias / /var/www/html/trunk/project/wsgi/flask.wsgi
    
            <Directory /var/www/html/trunk/SPM/wsgi>
                    WSGIProcessGroup ormgr
                    WSGIApplicationGroup %{GLOBAL}
                    #Require all granted
                    Order allow,deny
                    Allow from all
            </Directory>
    
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    

    【讨论】:

      猜你喜欢
      • 2014-03-03
      • 2020-03-27
      • 2021-06-17
      • 2016-12-12
      • 2013-12-16
      • 2014-07-28
      • 1970-01-01
      • 2015-03-08
      • 1970-01-01
      相关资源
      最近更新 更多