ProxyPass with trailing slash returns 404

1k views Asked by At

Consider the following configuration :

ProxyPass /myapp  http://localhost:8080/myapp
ProxyPassReverse /myapp  http://localhost:8080/myapp

Now requests that are made to http://www.example.com/myapp/foo/bar will be routed to my app with the expected results to the browser. However a request made to http://www.example.com/myapp/foo/bar/ will return a 404.

I observe the same results when I update the ProxyPass and ProxyPassReverse directives with the trailing forward slash.

I know that my Controller in my Spring app is set up to handle this URL pattern as calls made to http://localhost:8080/myapp/foo/bar/ work as expected.

I am using Apache 2.4 and Tomcat7. I have the following modules loaded:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule proxy_http_module modules/mod_proxy_http.so
0

There are 0 answers