TransWikia.com

Apache reverse proxy from root to context

Server Fault Asked by jzonthemtn on December 13, 2021

I am wondering if it is possible to configure Apache as a reverse proxy from /path to the root (/). I want to proxy http://server1/path to http://server2:8080 but I am not having any luck. I am finding that the path on the proxy and the backend application path must match – either as /path or / – or I get 404s from the reverse proxy because it loses the path when the request returns. If it matters the backend application is running in tomcat.

To summarize: Reverse proxy on http://server1/path -> Backend app on http://server2:8080/

I have tried modrewrite to the best of my ability but not gotten it to work. Can I rewrite the path after being processed by the reverse proxy? Or is there a better way?

One Answer

Did you try something like that:

<Location "/path/">
    ProxyPass "http://server2:8080/"
</Location>

If so, what does not work?

Answered by Patrick Mevzek on December 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP