Apache multiple ProxyPass entries in one VirtualHost
Solution 1:
The problem is that you have multiple VirtualHost sections for the same virtual host (localhost
), so Apache will just pick one. If you want these configurations to work together, you have to put the ProxyPass
directives in a single VirtualHost configuration:
<VirtualHost *:80>
ProxyPreserveHost On
ServerName localhost
ProxyPass /backend http://some_remote_ip:7000/backend
ProxyPassReverse /backend http://some_remote_ip:7000/backend
ProxyPassReverseCookiePath / /backend
ProxyPassReverseCookieDomain some_remote_ip localhost
ProxyPass /excluded !
ProxyPass / http://127.0.0.1:9000/
ProxyPassReverse / http://127.0.0.1:9000/
</VirtualHost>