Server Fault is a question and answer site for system and network administrators. 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

I'm about to lose my mind. How in the world do you tell CPAN to download via HTTP only? ...and NOT via a proxy.

share|improve this question

Simplest way of having it not use FTP is to shove HTTP URLs on the front of your urllist - or replace it completely like sebastionopilla said. You can do it from inside the cpan shell too:

o conf urllist unshift http://some.cpan.mirror/here/

You can use

o conf urllist -
o conf urllist shift

to empty it first if you wish.


o conf no_proxy 1

to turn off the proxy.


o conf commit

to save the config

share|improve this answer

Try putting only HTTP URLs in your CPAN's file, like:

'urllist' => [q[], q[], q[]],

I routinely do this and as far as I can see there's no FTP traffic to any CPAN mirror.

share|improve this answer
cpan[1]> o conf /proxy/
cpan[2]> o conf no_proxy 1
cpan[3]> o conf commit
share|improve this answer

If you don't want to use a cpan shell, you can also edit your cpan config file with a text editor, in unix systems it's here:


Of course, the field to change in your particular question is 'http_proxy'.

share|improve this answer

Try these:

  1. Before running cpan: export -n http_proxy
  2. In the cpan shell: o conf http_proxy ''
  3. To save your modified cpan config: o conf commit

That will disable any http proxy CPAN is configured to use.

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.