I'm developing a php application. I'm using wamp and I'm behind a corporate proxy. I'm using cntlm to authenticate NTLM. I need to curl google geocoding api, in order to do this I used the following settings that are working:
curl_setopt($ch,CURLOPT_PROXY, '127.0.0.1:3128');
curl_setopt($ch, CURLOPT_PROXYPORT, 3128);
I'd like to find a way to avoid setting those options for CURL. I believe I can play with Apache setting, but I'm not sure. The reasons I need to find this solution are:
So far I turned on proxy_module on apache and I added the following line on httpd.conf, but with no success
ProxyRemote * http://127.0.0.1:3128
I still can't access the internet. I googled a lot, but I couldn't find a solution, any ideas?
I could find many people talking about the same issue, but I didn't find any comprehensive solution, for this reason I raise a bounty.
There is this bug in which I found: But I'm not sure if this will work for curl and anyway I can't find how to modify the php.ini
[2010-12-20 14:03 UTC] [email protected] -Summary: changing the default http-wrapper +Summary: Add php.ini option to set default proxy for wrappers -Package: Feature/Change Request +Package: Streams related -PHP Version: 5CVS +PHP Version: *
and
[2011-04-05 11:29 UTC] play4fun_82 at yahoo dot com Hi, i have the same problem. My solution was to pass through proxy server with cntml tunneling tool. You configure cntml proxy to forward http request received on local host on a port to destination with proper authentication.
And in pear u just configure
pear config-set http_proxy 127.0.0.1:3128
3128 - is port configuret in cntlm(it can be any other free port).
Thanks very much
In addition to being a "basic" web server, and providing static and dynamic content to end-users, Apache httpd (as well as most other web servers) can also act as a reverse proxy server, also-known-as a "gateway" server.
An ordinary forward proxy is an intermediate server that sits between the client and the origin server. In order to get content from the origin server, the client sends a request to the proxy naming the origin server as the target. The proxy then requests the content from the origin server and returns it to the client.
Apache Default timeout is set to 300 seconds. This issue comes only when accessing website through apache reverse proxy. It works well by using internal IP.
You're saying you want this functionality on WAMP, for your development computer only, right? The SDK's work without modification in production, so you can just take advantage of your Window's Host file to redirect requests.
Here's a walkthrough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With