2017-03-03 58 views
2

我在從我的網頁中使用cUrl生成銷售團隊的銷售人員時,收到了「CONNECT」之後的56個「來自代理的HTTP代碼403」錯誤。該網站的SSL證書已過期。56 CONNECT後從代理接收到HTTP代碼403?

更新:

我的代碼如下:

curl_setopt($curl, CURLOPT_URL, $_url); 
    curl_setopt($curl, CURLOPT_POST, count($field)); 
    curl_setopt($curl, CURLOPT_POSTFIELDS, $query_data); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($curl, CURLOPT_HEADER, 1); 
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); 
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); 
    curl_setopt($curl, CURLOPT_USERAGENT, "cusom module"); 

回答

2

下面ProxyRequests Onhttpd_proxy.conf添加

AllowCONNECT port[-port] [port[-port]] ... 

Apache代理的

如:

ProxyRequests On 
AllowCONNECT 443 563 5000 

5000是目標端口地址。