I have 2 applications deployed on 2 servers:
http://10.10.10.5:8000 - the main applicationhttp://10.10.10.6:80 - help application
I would like these applications to be accessible from the following URLs:
http://protonnn.com - main applicationhttp://protonnn.com/help - help application
How do I configure the default Apache virtual host file to get the result? It can be done?
IMPORTANT: the help application should have a path context: / help - in other cases, images and page styles do not work
I tried the following configuration:
<VirtualHost*:80> ServerName protonnn.com ServerAlias protonnn.com ProxyPass / http://10.10.10.5:8000 ProxyPassReverse / http://10.10.10.5:8000 ProxyPass /help http://10.10.10.6 ProxyPassReverse /help http://10.10.10.6 <Location /> Order allow,deny Allow from all </Location> ServerAdmin webmaster@localhost DocumentRoot /var/www ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
I already found a solution:
<VirtualHost*:80> ServerName protonnn.com ServerAlias protonnn.com ProxyPass /help/ http:// 10.10.10.6/help/ ProxyPassReverse/ /help http:// 10.10.10.6/help/ ProxyPass / http:// 10.10.10.5:8000 ProxyPassReverse / http:// 10.10.10.5:8000 <Location /> Order allow,deny Allow from all </Location> ServerAdmin webmaster@localhost DocumentRoot /var/www ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
source share