You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Davis, Jesse (Austin)" <je...@hpe.com> on 2015/10/02 17:06:08 UTC

[users@httpd] Configuring Apache to use corporate proxy for external web requests

I have an Apache web server running on my intranet, and I would like for 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 - http://internal.company.com

*         Proxy - http://proxy.company.com:1234

*         External resource - https://external.site.com
Manually specifying the proxy for curl works as expected:

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

However, my best efforts to configure Apache have failed so far:

1.
    ProxyRequests Off

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

    ProxyPass https://external.site.com http://proxy.company.com:1234
    ProxyPassReverse https://external.site.com http://proxy.company.com:1234

2.

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

3.

    ProxyRequests On
    ProxyRemote * http://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<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#intranet> hasn't been terribly helpful.

Really appreciate any help!