我是一个代理,如果我尝试卷曲http:// localhost / mysite或curl http://127.0.0.1/mysite卷曲尝试用代理解决它。所以我尝试使用–noproxy选项,但不起作用。对外部服务器使用代理作为curl http://mysite.com工作正常。
我的配置:
> Cygwin(bash)在Windows 8下,卷曲扩展。
> Proxy:proxy.domain.xx:1080没有认证
> http_proxy = http://proxy.domain.xx:1080
>本地服务器:XAMP版本1.8.0
Apache端口:80,443
浏览器:Chrome代理,但配置为访问localhost和* .dev
从卷曲 – 帮助
–noproxy : Comma-separated list of hosts which do not use proxy
我试过的
>我已经禁用了防火墙,没有任何东西
> $ curl -v http:// localhost / mysite – >调试:
响应
Connected to proxy.domain.xx (200.55.xxx.xx) port 1080 (#0) GET http://localhost/mysite HTTP/1.1 User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8r zlib/1.2.3 Host: localhost Accept: */* Proxy-Connection: Keep-Alive The system returned: <PRE><I>(111) Connection refused</I></PRE>
curl -v –noproxy localhost,http:// localhost / muestra
响应
About to connect() to localhost port 80 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 80 (#0) > GET /mysite HTTP/1.1 > User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8r zlib/1.2.3 > Host: localhost > Accept: */* > < HTTP/1.1 301 Moved Permanently < Server: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 < Location: http://localhost/mysite < Content-Length: 331 < Content-Type: text/html; charset=iso-8859-1
任何想法如何解决这个问题?
后
原文链接:https://www.f2er.com/bash/387784.htmlcurl -v --noproxy localhost,http://localhost/muestra
卷曲响应
About to connect() to localhost port 80 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 80 (#0)
所以它清楚地表明它连接到本地主机。