Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We use httpd and mod_proxy as a reverse proxy in front of our different web servers.

We have our www subdomain pointed to the reverse proxy, and mod_proxy directs requests from there.

I haven't been able to come up with a concise way of saying this, so I'll just show:

If we have a web site at http://blah.example.com/my-web-app, we'll usually add a line like this to the reverse proxy:

ProxyPass   /my-web-app      http://blah.example.com/my-web-app

so that a user can go to http://www.example.com/my-web-app. When the path component of the request (/my-web-app in this case) is the same on both the reverse proxy, and the web server, the trailing slash will get added automatically, just like if someone went straight to http://blah.example.com/my-web-app.

However, if the path components are different, e.g.:

ProxyPass   /my-web-app      http://blah.example.com/some-other-path

then the trailing slash does not get added.

Is this behavior normal? Is there some configuration that could take care of this?

share|improve this question

1 Answer 1

Read carefully the section on ProxyPass in Apache httpd documentation (http://httpd.apache.org/docs/current/mod/mod_proxy.html). You can likely get around this behavior by explicitly specifying the trailing / for both arguments of the ProxyPass directive

ProxyPass   /my-web-app/      http://blah.example.com/some-other-path/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.