Reverse proxying only a specific URL
Posted
by
Bart Silverstrim
on Pro Webmasters
See other posts from Pro Webmasters
or by Bart Silverstrim
Published on 2011-10-06T15:33:54Z
Indexed on
2012/04/03
23:41 UTC
Read the original article
Hit count: 310
I have a web server at www.ourcompany.com running Apache2. Using the proxy modules, I am able to (for example) get 172.16.0.5, an internal IP device, to be accessed on www.ourcompany.com/device.
The trouble is that anyone can play with or explore the device using strings sent to www.ourcompany.com/device/change/settings/here.html. I'd like the reverse proxy to only work for a specific URL; www.ourcompany.com/device/you/must/use/this while anything else will be rejected if requested.
Is there a setting that can be used to do this, or is it a simple rewrite condition placed in the virtualhost for the site under sites-enabled? What is the simplest, most maintainable way to sanitize requests to the internal device through the reverse proxy?
Running Apache2 on Ubuntu.
© Pro Webmasters or respective owner