Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

We're running an internal debian package mirror via apt-mirror and this is working fine for the official debian package repositories. However, now I would like to add custom repositories which apt-mirror should monitor and keep up to date with.

The problem I am having is figuring out how to symlink the content of the custom repositories to my htdocs.

Right now I've got the following symlinks set up:

/var/www/debian -> /var/spool/apt-mirror/mirror/
/var/www/debian-security -> /var/spool/apt-mirror/mirror/

How do I go about adding symlinks from /var/www to the following package mirrors in such a way that I avoid having to add a new /var/www directory for each of the packages:


Preferably I would be able to add more custom repositories without having to update /etc/apt/sources.list on all the machines that are using the internal mirror. For example making them all accessible via

deb http://mirror.internal/debian-custom main
share|improve this question
up vote 0 down vote accepted

Each repository you are mirroring is separate by itself and will require a separate sources.list entry, or alternatively sources.list.d/ file. This is compounded by the different structure in your mirrored directory tree structures. As one of the apt-mirror Debian package maintainers I can say this is not something it was developed to support.

If you wanted to have a single custom repository you would need to take the contents of all those custom repositories contents and generating your own Packages file using one of the various packages available for handling your own repository. I would consider looking into mini-dinstall or reprepro for what you're wanting to do.

share|improve this answer
Thank you Jeremy. This seems to be exactly what I need. I'll come back when I've earned enough reputation to upvote your answer. – John B Dec 18 '11 at 12:17

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.