I'm trying to access a server that is running locally on my machine (localhost). I'm using the "wget"-command to download the servers http-response. I've also tried using the "curl"-command to do this, but both (wget and curl) are trying to get through my proxy-server and failing at it:

--2010-05-04 09:05:34--  http://localhost:8080/api/getplist
...
Proxy request sent, awaiting response... 503 Service Unavailable
2010-05-04 09:05:35 ERROR 503: Service Unavailable.

Obviously they shouldn't need to go through the proxy, right? So I disabled the http_proxy:

export http_proxy=""

And then it worked fine. Disabling the the http_proxy every time or permanently are no options. How can I set it to ignore the proxy settings when accessing "localhost"?

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Try setting the environment variable NO_PROXY to include localhost. It looks like curl expects this to be in upper case (NO_PROXY) and wget in lower case (no_proxy).

For wget you can also set the no_proxy list in the .wgetrc file (see info wget).

link|improve this answer
Setting the no_proxy variable worked! Thanks. – Chilloutman May 4 '10 at 20:49
feedback

Your Answer

 
or
required, but never shown

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