I’m new on apache reverse proxy, and I trying to reverse Url calling like bellow:
I’m able to forward all request on Webserver1 like that:
<VirtualHost *:80>
ProxyPreserveHost On
ServerName localhost
ProxyPass / http://webserver1/
ProxyPassReverse / http://webserver1/
</VirtualHost>
But I’m not able to make condition on Url Param example:
If "http://reverse.proxy.com/?param=foo" then forwarding it to WebServer 2
And also, I don’t know if those rules could be on the Same configuration.
Many thanks for your help
2
Answers
Finally, I found the solution to do like that.
it seems working fine
You should try this once..
<VirtualHost *:80>
ServerName localhost
RewriteEngine on
ProxyPass / http://webserver1/
ProxyPassReverse / http://webserver1/
RewriteRule "^/foo.html$" "bar.html" [R]