I use the formidable apt-cacher-ng
in my local network, as my internet connection is impressingly slow. Apt-cacher-ng allows for precaching updates at night when the internet connection is not in use otherwise.
With my Raspberry Pis, I frequently get 500 internal server error
messages after downloading packages with apt-get install. After some research, I found out that the error is connected to how the raspbian default mirror, mirrordirector.raspbian.org, redirects the clients to various mirror servers. Without digging further, I decided to create a workaround that can be applied centrally. Just add the following line to /etc/apt-cacher-ng/acng.conf and restart apt-cacher-ng:
Remap-raspbian: mirrordirector.raspbian.org/raspbian ; mirror.netcologne.de/raspbian/raspbian mirror.informatik.uni-mannheim.de/pub/linux/distributions/raspbian/raspbian
(All in one line!) Instead of the mirrors given here, you should add some of the official raspbian mirrors from this list
that have a good download speed for you.