我要使用 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