0

I have a situation where I need to route requests to Apache through an internal Proxy Server before redirecting to an external Site, the setup is something like this:

Browser Request --> Apache --> Internal Proxy Server --> External Site

Without the Proxy Server I accomplished the redirect using a rewrite handled as a Proxy( [P] )

RewriteRule ^/somepath/(.*) http://www.externalsite.com/$1 [P,QSA,L]

I found setting up apache behind a forward proxy which looked like it was what I wanted to setup, and suggested I try the following directives:

ProxyPass /somepath/ http://www.externalsite.com/
ProxyPassReverse /somepath/ http://www.externalsite.com/
ProxyRemote  http://www.externalsite.com/ http://internal.proxy.ip.addy:8080

When I set this up I got a 503 and the following Apache log entries:

[Thu Apr 11 07:47:14 2013] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://www.externalsite.com/somefile.html
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (www.externalsite.com)
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2067): proxy: connecting http://www.externalsite.com/somefile.html to www.externalsite.com:80
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2193): proxy: connected http://www.externalsite.com/somefile.html to internal.proxy.ip.addy:8080
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to www.externalsite.com
[Thu Apr 11 07:47:35 2013] [error] (OS 10060)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.  : proxy: HTTP: attempt to connect to internal.proxy.ip.addy:8080 (www.externalsite.com) failed

Nothing was logged in the proxy server logs, and I know the proxy server works if I set it explicitly in the browser and load that externalsite.com

Any thoughts?

Community
  • 1
  • 1
Phoenix
  • 33
  • 1
  • 6

1 Answers1

0

Ended up being a vmware IP address issue when connecting to the proxy... The above directives do seem to correctly proxy apache through to the proxy server.

Phoenix
  • 33
  • 1
  • 6