I am a developer, not a sys-admin :) I always have been running multiple vhosts in parallel on different ports, but this time something is interfering.
I have one vhost which runs a python-based django web application, which uses wsgi. The other one would be a plain php application. They need to interact and I am testing this. Each config is in a different file (ubuntu based).
The php application:
<VirtualHost *:8778>
ServerAdmin webmaster@localhost
ServerName lochost.localdomain
DocumentRoot /home/projects/df/htdocs
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/projects/df/htdocs>
Options Indexes FollowSymLinks MultiViews
#AllowOverride None
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
The python/django app:
WSGIScriptAlias / /home/projects/dfp/wsgi/wsgi.py
WSGIPythonPath /home/projects/dfp/newapp
<VirtualHost *:9988>
ServerAdmin webmaster@localhost
ServerName localhost.local
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteCond /home/projects/dfp/etc/httpd/maintenance-mode-on -f
RewriteCond %{REQUEST_URI} !^/media/.*$
RewriteRule ^.* /media/maintenance.html [L,PT]
Alias /media /home/projects/dfp/newapp/media
<Directory /home/projects/dfp/newapp/media>
Allow from all
AllowOverride All
Order allow,deny
</Directory>
<Location "/media">
SetHandler None
#ExpiresActive on
#ExpiresDefault "access plus 1 week"
FileETag MTime Size
EnableSendfile Off
</Location>
Alias /adminmedia /home/projects/dfp/administrative/media
<Directory /home/projects/dfp/administrative/media/>
Allow from all
AllowOverride All
Order allow,deny
</Directory>
<Location "/adminmedia">
SetHandler None
#ExpiresActive on
#ExpiresDefault "access plus 1 week"
FileETag MTime Size
</Location>
<Directory /home/projects/dfp/newapp>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
</VirtualHost>
As a result of this config, when I go to the python app (localhost:9988) all is fine, but accessing the php app (localhost:8778) I am getting redirected to the other one for the content, although it appears without css, but the address bar still says localhost:8778.
What is wrong? I suspect the WSGIScriptAlias / /home/projects/dfp/wsgi/wsgi.py
directive at the top of the python app config is causing the mess. Anyway I could have both apps running in parallel while still using WSGI? Thanks