Deprec, Ubuntu 7.0.4 (Feisty), and your Proxy server

Posted by Dave Bryson on September 05, 2007

The Problem

Your trying to deploy a Rails app using Deprec on Ubuntu running behind a proxy server and getting connection errors.

Possible solution

You need to tell apt-get about your proxy server. Here’s how I did it:

  1. Create a file ”/etc/apt/apt.conf”
  2. In the file add the following:
Acquire { Retries "0"; HTTP {Proxy "http://YOURPROXY:PORT";};};

Now edit the proxy information in ”/etc/wgetrc” by uncommenting “use_proxy” and setting “http_proxy”:

use_proxy = on
http_proxy = http://YOURPROXY:POST

Finally add the proxy to ”/etc/bash.bashrc”

http_proxy = http://YOURPROXY:POST
export http_proxy

Once I did this, everything worked great!