我有两个独立的Django项目,一个在/和另一个在/ foo。间歇性地,如果我尝试在/中访问项目,它将引发一个PageNotFound异常并显示来自/ foo项目的URL文件,反之亦然。我假设与Apache或mod_wsgi存在某种冲突,但我无法真正找到它是什么。有办法避免这种情况吗?我真的不想在一个单独的域上运行每个项目,这似乎有效。
编辑:我的django / wsgi配置(我的httpd.conf与安装基本没有变化)
WSGIPythonPath /var/django/bumppoman:/var/django/roads:/var/django/hawthorn:/var/django/wiffleball
<VirtualHost *:8081>
ServerName site1.com
WSGIScriptAlias /hawthorn /var/django/hawthorn/apache-files/wsgi.py
WSGIScriptAlias /roads /var/django/roads/apache/wsgi.py
WSGIScriptAlias / /var/django/bumppoman/apache/wsgi.py
<Directory "/var/django/roads/apache">
Require all granted
</Directory>
<Directory "/var/django/bumppoman/apache">
Require all granted
</Directory>
<Directory "/var/django/hawthorn/apache-files">
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:8081>
ServerName site2.com
WSGIScriptAlias / /var/django/wiffleball/apache/django.wsgi
<Directory "/var/django/wiffleball/apache">
Require all granted
</Directory>
</VirtualHost>