简体   繁体   English

使用mod-wsgi在Apache上部署Cherrypy

[英]Deploy cherrypy on apache with mod-wsgi

I installed mod-wsgi and have a cherrypy helloworld code I want to deploy it to apache because I want to use multithreading and measure performance of cherrypy. 我安装了mod-wsgi并有一个cherrypy helloworld代码,我想将其部署到apache,因为我想使用多线程并评估cherrypy的性能。 What apache configs I have to do including virtualhost and what to do with cherrypy code. 我必须做的apache配置包括virtualhost以及如何处理cherrypy代码。

try this... 尝试这个...

<VirtualHost *>
    ServerName example.com

    WSGIDaemonProcess yourapplication user=user1 group=group1 threads=5
    WSGIScriptAlias / /var/www/yourapplication/yourapplication.wsgi
    <Directory /var/www/yourapplication>
        WSGIProcessGroup yourapplication
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

http://flask.pocoo.org/docs/deploying/mod_wsgi/#configuring-apache http://flask.pocoo.org/docs/deploying/mod_wsgi/#configuring-apache

your yourapplication.wsgi file will refer to your webapp.py file. 您的yourapplication.wsgi文件将引用您的webapp.py文件。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM