I have a problem with configuration proxy. I have a Apache proxy on "10.0.0.1" address, and another application server on IP "10.0.0.2". The application server are four application where three working on 8080 port, and fourth on 8086 port. Scheme User -> "10.0.0.1:80" (Apache proxy) -> "10.0.0.2" (Server with application on 8080 and 8086 port)
<VirtualHost *:80>
ServerName 10.0.0.1
ServerAlias prod
ErrorLog /var/log/httpd/prod-error.log
TransferLog /var/log/httpd/prod-access.log
ProxyPreserveHost On
RewriteEngine On
ProxyPass / http://10.0.0.2:8080/
ProxyPassReverse / http://10.0.0.2:8080/
RewriteRule ^/(.*) http://10.0.0.2:8080/$1 [P]
ProxyPass / http://10.0.0.2:8086/
ProxyPassReverse / http://10.0.0.2:8086/
RewriteRule ^/(.*) http://10.0.0.2:8086/$1 [P]
</VirtualHost>
This is don't work, when I'm trying for only 8080 port it's working OK (the same when I comment I rules for 8080 port, the service on 8086 port working correclty). What I do need to apps worked for two different ports on the same serevr throw Proxy working correctly.
Best regards and thank you