Just for assumption here
testsite.com
which is my php application and
testsite.com/project
is python application
I have following settings in my apache site config file /etc/apache2/sites-available/site.conf
<VirtualHost *:443>
ServerAdmin webmaster@testsite.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@testsite.com
DocumentRoot /var/www/html/test-project
<Directory /var/www/html/test-project/test-project>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess test python-path=/var/www/html/test-project/test-project python-home=/var/www/html/test-project
WSGIProcessGroup test
WSGIScriptAlias / /var/www/html/test-project/test-project/wsgi.py
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Looking at above config, I just want any url with testsite.com/
will get served from first virtualhost which is my php application and its working and whenever only this specific testsite.com/project
url hits then it should get served from second virtualhost which is my python application.
So inorder to get this url testsite.com/project
served from second virtualhost it has to get bypass from first virtualhost.
Please suggest how do I do that ? What should I do in first virtualhost so that it wil get bypassed to second.
NOTE: This is not related with url rewriting so please do not suggest anything rewriting rule or anything regarding that.