多个部署Apache mod_wsgi Django

时间:2019-05-15 22:22:18

标签: django apache

我要使用 APACHE MOD_WSGI 部署2个应用,问题是 app2从app1获取静态文件的url,这是我的代码 django.conf:

<VirtualHost *:80>
        WSGIPassAuthorization On

        WSGIDaemonProcess rgmanagement python-path=/var/www/html/inventariosRG:/home/roo/vproduccion/lib/python2.7/site-packages
        WSGIScriptAlias /rgmanagement /var/www/html/inventariosRG/inventarios/wsgi.py process-group=rgmanagement
        WSGIDaemonProcess facturacion python-path=/var/www/html/facturacion:/home/roo/vproduccion/lib/python2.7/site-packages
        WSGIScriptAlias /facturacion /var/www/html/facturacion/inventarios/wsgi.py process-group=facturacion
        <Directory /var/wwww/html/inventariosRG/inventarios>
                <Files wsgi.py>
                Require all granted
                </Files>
        </Directory>
        Alias /static /var/www/html/inventariosRG/static
        <Directory /var/www/html/inventariosRG/static>
                Require all granted
        </Directory>

        <Directory /var/www/html/facturacion/inventarios>
                <Files wsgi.py>
                Require all granted
                </Files>
        </Directory>
        Alias /static /var/www/html/facturacion/static
        <Directory /var/www/html/facturacion/static>
                Require all granted
        </Directory>

        DocumentRoot /var/www/html

        ErrorLog /var/www/html/error.log
        CustomLog /var/www/html/access.log combined


</VirtualHost>

我为此文件的静态文件设置了不同的URL,但是我不知道为什么会得到不正确的静态文件,请提出任何建议……。

我正在使用CentOS 7

0 个答案:

没有答案