Apache proxy throws error connecting to a third party

6

Connection to a certain thirdparty service via PHP Curl throws this error:

CURL error: Received HTTP code 403 from proxy after CONNECT

The Apache error log on the proxy throws this:

Connect to remote machine blocked returned by remote.service.com:59315

I would like to know how to get this to work!

Proxy Config:

<VirtualHost *:8001>
    ProxyRequests On

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

    ProxyVia Off

    <IfModule mod_headers.c>
        Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"NOI DSP COR NID CUR ADM DEV OUR BUS\""
    </IfModule>

    AllowCONNECT 443 1129 7934 8080 993
</VirtualHost>

The domain IP is allowed, as seen from this log:

[error] [client 10.234.9.46] proxy: Connect to remote machine blocked returned by

Stewie

Posted 2014-01-10T19:38:56.397

Reputation: 173

That error is often seen when the domain is blocked in the Apache configuration. http://unixhelp.ed.ac.uk/manual/mod/mod_proxy.html#proxyblock Post your proxy configuration.

– Panther – 2014-01-10T19:47:26.673

Edited the question with proxy config. – Stewie – 2014-01-10T19:51:29.870

Answers

1

Adding AllowCONNECT for the proxy port worked. That wasn't needed for Apache 2.2 but is for Apache 2.4. For us, it's from IBM HTTP Server 8.5.5 to IBM HTTP Server 9.

Prior comment has my virtual upvote since that doesn't work yet. You'd think they might take reputation points from Stack Overflow. Took a bit of searching to find this answer, so thanks.

George Statham

Posted 2014-01-10T19:38:56.397

Reputation: 11