【问题标题】:Apache2 wsgi threads/processesApache2 wsgi 线程/进程
【发布时间】:2016-04-13 14:50:47
【问题描述】:

我想问你如何配置apache2 来运行我的wsgi 脚本。我开发了一个 Python 应用程序,它一方面 实现线程、锁等,但另一方面使用日志记录模块。问题是,如果我想在服务器同时遇到多个请求时在多个实例中运行我的应用程序,我应该如何为apache2 配置app.conf 文件?此外,在指定WSGI DaemonProcess 时,您能否解释一下processes=Xthreads=Y 之间的区别?非常感谢。

【问题讨论】:

    标签: python apache2 wsgi


    【解决方案1】:

    这是我的 app.conf 文件的样子:

    WSGIPassAuthorization On
    WSGIPythonPath /home/brms/brms
    WSGIDaemonProcess pyramid user=username group=usergroup threads=4 python-path=/usr/local/lib/python3.4/dist-packages/
    <VirtualHost *:80>
        <Directory /home/brms/>
            <Files wsgi.py>
                    WSGIProcessGroup pyramid
                    Require all granted
            </Files>
        </Directory>
        Alias /meetingApp /var/www/meetingApp
    </VirtualHost>
    WSGIScriptAlias / /home/brms/wsgi.py
    

    【讨论】:

      猜你喜欢
      • 2021-07-06
      • 1970-01-01
      • 1970-01-01
      • 2023-03-13
      • 1970-01-01
      • 2012-12-11
      • 2016-10-14
      • 1970-01-01
      • 2021-01-21
      相关资源
      最近更新 更多