Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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"?

share|improve this question
add comment

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).

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

Your Answer

 
discard

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.