apt-got - a simple mirror engine

http://hacktor.fs.uni-bayreuth.de/apt-got/

0. Introduction

0.1 Content

0. Introduction
0.1 Content
0.2 Author
0.3 Latest version

1. Preamble

2. Compiling and installing

3. Configuring StandAloneAptGot and mod_mirror
3.1 Mirror engine part
3.2 Preparing Apache
3.3 Making the "connection"

0.2 Author

This documentation of mod_mirror is written by
Tobias Hertkorn - <t.hertkorn@gmx.de>
© 2004

0.3 Latest version

The latest version of mod_mirror and this documentation can be picked at http://hacktor.fs.uni-bayreuth.de/apt-got/

1. Preamble

Before proceeding please be sure that you understand the workings of apt-got compeletly. The introduction of the mod_mirror module could break your mirroring system if you don't know exactly know, what you are doing. Fortunately it is very easy to detect configuration errors. So don't be too scared. (Just a bit! ;o) )

2. Compiling

Unfortunately I do not have a lot of experience in compiling on different architectures. All I can tell you is, that compiling by just typing make in the root directory of the source repository worked fine for me. (I am working and developing on Debian. ;o) What else?) If everything went smoothly you should end up with a mod_mirror.so file. Please send me some feedback if you did succeed in compiling it on any other architecture/operating system.

After you have successfully created the mod_mirror.so you should copy it to the apache modules directory. For my apache that would be /usr/lib/apache/1.3/.
Now you have to tell apache to load the module on startup. This is done by the following line (assuming you put mod_mirror.so in /usr/lib/apache/1.3/):

LoadModule mirror_module /usr/lib/apache/1.3/mod_mirror.so

3. Configuring StandAloneAptGot with mod_mirror

3.1 Mirror engine part

Please make sure that you read and completely understood the configuration documentation for the StandAloneAptGot. The mod_mirror needs a fully configured and working StandAloneAptGot to make any sense.

3.2 Preparing Apache

After you have successfully created the mod_mirror.so you should copy it to the apache modules directory. For my apache that would be /usr/lib/apache/1.3/.
Now you have to tell apache to load the module on startup. This is done by the following line (assuming you put mod_mirror.so in /usr/lib/apache/1.3/) in the apache configuration file (usually /etc/apache/httpd.conf):

LoadModule mirror_module /usr/lib/apache/1.3/mod_mirror.so

3.3 Making the "connection"

On a side note, the standard setting is that the mod_mirror is turned off.

There are several way to configure the mod_mirror. I will describe the way, where apache get adapted to the settings in StandAloneAptGot.

I would advise you to create a file called apt-got.conf in the /etc/apache directory.
To ensure that this file gets parsed by apache add following line at the end of httpd.conf:
include /etc/apache/apt-got.conf

From now on down all changes will be done in apt-got.conf.

For every module you configured put something like the following in apt-got.conf:

<IfModule mod_mirror.c>
  Alias /debian/ /mirrors/debian/
  <Directory /mirrors/debian>
    MirrorModule On
    MirrorURL http://your.host.name:8085/debian
    MirrorDirectory On
    AllowOverride None
  </Directory>
</IfModule>

Now I will walk you through the meanings of those directives:

All you have to do is apply this example to all modules you want to make available through apache.

REMEMBER: Do not say MirrorURL http://localhost:8085/... as this would create a local redirect on the client machine! Therefore always give the full hostname.

Don't hesitate to contact me if you have any further questions.