0

I have an Apache web server running on my intranet.

I want all external HTTP/HTTPS requests from my Apache web app to use my company's intranet proxy.

Environment

  • Linux v2.6.32-504.12.2.el6.x86_64
  • Red Hat v4.4.7-9
  • Apache v2.2.15

I have enabled the following modules in httpd.conf

  • proxy_module
  • proxy_connect_module
  • proxy_http_module

URLs

  • Site is internal.company.com (http)
  • Proxy is proxy.company.com:1234 (http)
  • External resource is external.site.com (https)

Manually specifying the proxy on a curl works as expected:

curl -x proxy.company.com:1234 -L external.site.com

None of these appear to work:

1.

ProxyRequests Off

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

ProxyPass external.site.com proxy.company.com:1234
ProxyPassReverse external.site.com proxy.company.com:1234

2.

ProxyRequests On
ProxyRemote external.site.com proxy.company.com:1234
NoProxy .company.com

3.

ProxyRequests On
ProxyRemote * proxy.company.com:1234
NoProxy .company.com

And I've tried various combinations of the above settings as well. The info in the Apache docs about Intranet Proxy hasn't been terribly helpful, either.

Really appreciate any help!

1 Answer 1

0

Apache web app

Apache is not running your web app, it is something like PHP or another handler that is running your app. Apache accepts a connection, and then if the destination URL matches a script handler, hands the HTTP data to the script handler, and then hands the output back to the requesting connection. Apache doesn't really control what the script handler does outside of the HTTP or other data it spits back.

The options you are messing with are for setting up reverse proxies, which is not the same as an outgoing HTTP proxy.

You have to configure the web app itself to use a proxy for outgoing requests. A brief search doesn't bring up an easy way to make all PHP apps, for example, use a proxy for outgoing connections, so this is something that hopefully your application supports.

1
  • Ah ok, yes, sorry for the misnomer. I have an Apache web server hosting a node app. Really glad you pointed that out as I had become so consumed with trying to pin this as an Apache issue. I'll see about configuring the requests in node to use a proxy.
    – KarlHungus
    Oct 2, 2015 at 16:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .