Using regex for proxypass

I am trying to configure a proxy server for my ActiveMQ account in a corporate environment on our standard HTTP proxy server. I have a rule allowing me to access the admin landing page:

ProxyPass /foobar hostname:8161/admin

ProxyPassReverse / foobar hostname: 8161 / admin

However, going to the "queues" page will lead me to another page added with a unique session identifier (admin / queues.jsp; jsessionid = oq37zgvxz4zkwliwdwddyon3), and I would like this page to be accessible through the same URL as well.

Attempting to add a wildcard character (*) at the end of these proxypass rules violates the redirect. Is there a redirection rule that I need to use in conjunction with this, and how do I get any string for this host to pass this proxy rule?

+4
source share
1 answer

There is a ProxyPassMatch -based ProxyPassMatch , but ProxyPass does the prefix matching (i.e., the ProxyPass for /foo should catch /foo/bar too), so your current rule should work anyway.

Maybe the redirect URL for some reason does not match the reverse rule. I have to admit that I never managed to use ProxyPass for Tomcat to work correctly when the different front and back context paths are different, so my advice would be to deploy the application to the end of hostname:8161/foobar instead of /admin if this is an option.

+2
source

Source: https://habr.com/ru/post/1438784/


All Articles