使用modwsgi.conf在mod_wsgi + apache + pyramid上运行多个子域

时间:2014-05-21 05:22:39

标签: apache mod-wsgi pyramid

我试图让多个子域名托管在域名上,即。 demo1.mydomain.com,demo2.mydomain.com

我成功地在www.mydomain.com上运行了金字塔,但是,当时 我试图让子域(demo1.mydomain.com)运行另一个金字塔应用程序, 尽管我已经创建并安装了金字塔,但它并没有与金字塔挂钩 金字塔项目进入文件夹。

在/usr/local/apache/conf/userdata/std/2_2/mydomain/mydomain.com/modwsgi.conf

WSGIApplicationGroup %{GLOBAL}

WSGIPassAuthorization On
WSGIDaemonProcess pyramid_mainsite user=mydomain group=mydomain threads=4 \ 
python-path=/home/mydomain/modwsgi/env/lib/python2.6/site-packages

WSGIScriptAlias / /home/mydomain/modwsgi/env/pyramid_mainsite.wsgi
WSGIScriptAlias /admin /home/mydomain/modwsgi/env/pyramid_mainsite.wsgi

<Directory /home/mydomain/modwsgi/env>
    WSGIProcessGroup pyramid_mainsite
    Order allow,deny
    Allow from all
</Directory>

WSGIDaemonProcess pyramid_demo1 user=mydomain group=mydomain threads=4 \
python-path=/home/mydomain/modwsgi/env/lib/python2.6/site-packages

WSGIScriptAlias / /home/mydomain/modwsgi/env/pyramid_demo1.wsgi
WSGIScriptAlias /admin /home/mydomain/modwsgi/env/pyramid_demo1.wsgi

<Directory /home/mydomain/modwsgi/env>
    WSGIProcessGroup pyramid_demo1
    Order allow,deny
    Allow from all
</Directory>

0 个答案:

没有答案