Syndicate content

Add a cache to upgrade your LAN servers faster

Since I have several computers running Ubuntu, I like to have them up to date, but it always takes a bit of time to download the new packages. I think those should be downloaded only once and then shared between all my computers (I also run VPS which can benefit from this sharing.)

So, I decided to finally look into it and the simplest was to install apt-cacher-ng on my main server:

sudo apt-get apt-cacher-ng

That's it for the main server (from what I've read, at least, although I am thinking that maybe we need to tell apt-get to check that cache first even on the main system?)

Next, on each of the computers that you want to gather information from the outside enter a proxy definition like this:

# To create/open the file
vim /etc/apt/apt.conf.d/02proxy

# First a proxy (change IP address with your main server IP):
Acquire::http { Proxy ""; };

# Second, entries to skip the proxy if required (i.e. entries using HTTPS)
# Enter the domain name and then DIRECT, enter multiple separated by ';'
Acquire::http::Proxy { DIRECT; };

This will already work pretty well, but once in a while you will have to upgrade a file which requires more rights on the server side. This means you need to enter a user name and a password of someone who can run apt-get.

# Open the security.conf file
vim /etc/apt-cacher-ng/security.conf

# Edit the AdminAuth variable with your administrator name and password:
AdminAuth: james:bond

That edit will prevent the 500 Missing Content-Length errors you were seeing.

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165


Terms of Site Index

Find the page/content you are looking for with our index.

  • MS-Access
  • PHP

    ODBC driver for QuickBooks

  • form
  • vsftpd

    Very Secure File Transfer Protocol Daemon, an FTP server that allows people to transfer data between computers. It is marked as very secure, at least it is as secure as an FTP server can be (although there has been several security advisories for this tool...)

    Remember that an FTP transfer is rarely using an encrypted pipe (it is possible to use kerberos and SSL to really secure the data transmission) and also because it uses a data stream opened dynamically, it is possible for hackers to spoof a data connection.