Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

trying to connect to my script on a remote server with curl but:

col-pos-spd# curl -v http://***:80/monitor/reply.php
* About to connect() to *** port 80 (#0)
*   Trying Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

then i tried wget and:

wget -v http://***/monitor/reply.php
--2011-09-22 12:29:07--  http://***/monitor/reply.php
Connecting to connected.
Proxy request sent, awaiting response... 200 OK
Length: 8 [text/html]
Saving to: `reply.php'

100%[====================================================================================================================>] 8           --.-K/s   in 0s

2011-09-22 12:29:07 (1.05 MB/s) - `reply.php' saved [8/8]

so i can't figure out whi i'm getting an error with curland how can i avoid it?

share|improve this question
up vote 1 down vote accepted

Proxy request sent, awaiting response... 200 OK

wget may be using a proxy setting whilst curl isn't - check your environment variables (http_proxy?) and startup files.

you can test this with

wget --proxy=off …

wget 1.13 checks environment variables http_proxy, ftp_proxy, no_proxy
curl 7.22 checks environment variables http_proxy, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY, ALL_PROXY, NO_PROXY

wget can read these settings from ~/.wgetrc
curl can read these settings from ~/.curlrc

share|improve this answer
thaks! but i've got a problem: http_proxy is undefined and /usr/local/etc/wgetrc is empty. where can wget store it's settings? – k102 Sep 22 '11 at 12:37
@k102: In your home directory (that's what ~/ means) in a file named .wgetrc - remember that ls won't show it without the -a option. – RedGrittyBrick Sep 22 '11 at 12:57
there's no such file (ls -a and ls -all)... – k102 Sep 22 '11 at 13:06

I've got the same problem, and I just solved it!
The answer is to open the PSAV mode, because the curl use the PORT mode for ftp as default. use it like this:

curl --ftp-port 21  ftp://your.address
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.