我在代理下,如果我尝试curl http://localhost/mysite
或curl http://127.0.0.1/mysite
curl 尝试使用代理解决它。所以我尝试了--noproxy
选项,但不起作用。对于代理为curl http://mysite.com
.
我的配置:
- 带有 curl 扩展名的 Windows 8 下的 Cygwin (bash)。
- 代理:
proxy.domain.xx:1080
无认证 http_proxy=http://proxy.domain.xx:1080
- 本地服务器:XAMP 版本 1.8.0
- 阿帕奇端口:80,443
- 浏览器:带代理的 Chrome,但配置为访问
localhost
和*.dev
来自 curl --help
--noproxy :逗号分隔的不使用代理的主机列表
我尝试了什么:
- 我已停用防火墙,但什么也没有
$ 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
知道如何解决这个问题吗?