View Full Version : Apache ProxyPass
yagran
Aug 9, 2008, 07:17 PM
Hi. Im trying to set up a proxy to help me get around cross domain security issues im having.
I have a VPS from GoDaddy and its running Plesk on Windows 2000.
Following instructions at xml.com (link (http://www.xml.com/pub/a/2005/11/09/fixing-ajax-xmlhttprequest-considered-harmful.html?page=2)) I searched my server for the mod_proxy extension, which i found to be on the server, and then i searched for the httpd.conf file. I opened that up and added two lines of code:
ProxyPass /call/ http://webservices.amazon.com/onca/xml/
ProxyPassReverse http://webservices.amazon.com/onca/xml/
I restarted my server but my redirect doesnt seem to be working at all...
any idea what ive done wrong? thanks in advance
angelwatt
Aug 9, 2008, 08:13 PM
Aren't you missing the second argument on the ProxyPassReverse line? Not that I've ever used this. I just read a little here. (http://httpd.apache.org/docs/1.3/mod/mod_proxy.html)
yagran
Aug 10, 2008, 05:23 AM
Aren't you missing the second argument on the ProxyPassReverse line? Not that I've ever used this. I just read a little here. (http://httpd.apache.org/docs/1.3/mod/mod_proxy.html)
Im not sure what second argument theres supposed to be? the example youve linked to suggests this:
Example:
Suppose the local server has address http://wibble.org/; then
ProxyPass /mirror/foo/ http://foo.com/
ProxyPassReverse /mirror/foo/ http://foo.com/
will not only cause a local request for the <http://wibble.org/mirror/foo/bar> to be internally converted into a proxy request to <http://foo.com/bar> (the functionality ProxyPass provides here). It also takes care of redirects the server foo.com sends: when http://foo.com/bar is redirected by him to http://foo.com/quux Apache adjusts this to http://wibble.org/mirror/foo/quux before forwarding the HTTP redirect response to the client.
which seems to indicate that my code is correct. no?
angelwatt
Aug 10, 2008, 07:41 AM
Im not sure what second argument theres supposed to be? the example youve linked to suggests this:
which seems to indicate that my code is correct. no?
# The Example
ProxyPass /mirror/foo/ http://foo.com/
ProxyPassReverse /mirror/foo/ http://foo.com/
# Yours
ProxyPass /call/ http://webservices.amazon.com/onca/xml/
ProxyPassReverse <something/missing/here> http://webservices.amazon.com/onca/xml/
They have the /mirror/foo/ where you have empty space. That's what I was getting at.
yagran
Aug 10, 2008, 08:56 AM
# The Example
ProxyPass /mirror/foo/ http://foo.com/
ProxyPassReverse /mirror/foo/ http://foo.com/
# Yours
ProxyPass /call/ http://webservices.amazon.com/onca/xml/
ProxyPassReverse <something/missing/here> http://webservices.amazon.com/onca/xml/
They have the /mirror/foo/ where you have empty space. That's what I was getting at.
Thankyou will try that now! IM SO STUPID! :(
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.