How to become a mirror for the Apache Software Foundation

The Apache Software Foundation has mirror sites from all around the world, but we are always looking for more reliable and well connected sites that can help us distribute our software. We no longer encourage mirrors for the various Apache Software Foundation websites, since they have become too complicated to be easily replicated. Instead, we request mirrors that can aid in distributing the software itself by mirroring our main software distribution directory.

Requirements

We have a few requirements for those wishing to run a mirror:

  • At least 90 GB of available disk space. The current distribution directory is around 45 GB, but we wish to leave room for considerable expansion.
  • You may mirror either the full distributions tree, or a reduced tree that excludes a few very resource-intensive (disk-wise and bandwidth-wise) projects.
  • You must not trim or abridge the mirrored tree in any way.
  • You must not modify the mirrored tree in any way. In particular, HEADER.html and README.html files must not be altered or removed ; see below for adding sponsor information.
  • Your mirror must not be shown "inside" another site using, for instance, frames.
  • You must do an update-check at least once a day, and preferably twice a day. You may sync 4 times (max) per day, but only if you have a slow or weak connection, causing timeouts.
  • You must subscribe to the mailing list for mirror maintainers (see below ).

In addition, we require that you run the Apache HTTP Server version 1.3.26 or 2.0.43 or later and use the following configuration for your web mirror to allow all the features of our download site to function optimally:

Apache HTTP Server Configuration
<Directory /path/to/mirror>
  IndexOptions FancyIndexing NameWidth=* FoldersFirst ScanHTMLTitles DescriptionWidth=*
  HeaderName HEADER.html
  ReadmeName README.html
  AllowOverride FileInfo Indexes
  Options Indexes SymLinksIfOwnerMatch FollowSymLinks
  ErrorDocument 404 default
</Directory>

Please note that our HEADER.html files do not contain the HTML pre-amble, so it is important that the option SuppressHTMLPreamble is not enabled.

We do add ftp mirrors to our list, but we much prefer http mirrors and we select only http mirrors as "preferred" mirrors.

Mirroring Techniques

We only support rsync for updating mirrors.

You can find details on rsync at http://rsync.samba.org/. Update your mirror with :

rsync -avz --delete --safe-links rsync.apache.org::apache-dist /path/to/mirror

If you wish to exclude resource-intensive projects, replace ::apache-dist by ::apache-dist-most. Do not use --exclude.
(At the time of writing, the ::apache-dist module was 68GB and the ::apache-dist-most module a 35GB subset of it.)

The rsync.apache.org DNS name resolves to the apache rsync master closest to you : rsync.eu.apache.org for mirrors in or near Europe ; and rsync.us.apache.org otherwise.

If there is a problem with file/directory permissions, make sure you use a proper umask in your cronjob :

umask 022 ; rsync ...

Please don't rsync "on the hour" (cronjob minute 0) ; pick a random minute between 5 and 55. Never run cronjobs at minute 0 unless the nature of the job requires it.

Please note: older versions of this page (June 2011 and before) said to use the options '-rtlzv'. This was wrong, because the '-p' (preserve permissions) option was missing. Please ensure you use '-avz'. The '-a' (archive mode) option includes the '-p' option.

You can add sponsor information (only) as follows :

  • edit the file /local/path/to/mirror/README.html
  • add to your rsync options --exclude "/README.html"

The contents of README.html will appear near the bottom of your mirror's home page.

Please note that only the home-page (top-level) README.html may be customized in this way; all other README.html files must be mirrored unchanged. Don't omit the '/' in "/README.html".

Please limit the contents of the README.html to something like This mirror is donated by www.domain.com [url] to support the Apache open source community. Refering to specific services or products may be seen as PageRank manipulation by search engine companies and may have an adverse effect on your site's ranking.

It has been noted that certain sites redirect 404 pages as a form of extra advertising or traffic booster. We will remove mirrors that do this from our list and then send an email to the maintainers address. The top level /README.html file as mentioned above is the ONLY local alteration of any part of the mirror we accept for you to provide Sponsor Information.

Testing your mirror

We sometimes get requests to add mirrors that are not working correctly. Please check at least the following:

  • page headers and footers are being displayed correctly
  • check that all the top-level directories and files on the ASF mirror are present on your mirror
  • download a couple of files to check that they work.
  • trying to download a missing file should generate a 404 Not Found error. You can do this by modifying one of the valid URLs that you tested above.

Inform us!

Once the site is configured, tested, and updating consistently, you should subscribe to the mirror maintainers mailing list by sending an mail to "mirrors-subscribe@apache.org".

If possible, please use an alias like admin@hostname.example for the contact address rather than a personal e-mail address. To subscribe the alias address, send the email to "mirrors-subscribe-admin=example.org@apache.org".

Then you can provide us with details of your mirror by submitting them to our Issue Tracker. You'll need to sign up for an account, then create a new issue in project "Infrastructure (INFRA)" with component "Mirrors".

Please include the following information in the Description field:

  • URL of mirror :
  • [optional] rsync mirror : rsync://rsync.your.org/apache/
  • Country where the mirror is located :
  • Contact email address :
  • Update frequency :
  • Rsync repository used :
  • I use these rsync options :
  • I have configured my Apache HTTP server as requested (yes/no)
  • I have subscribed the contact address to mirrors@apache.org : (yes/no)
  • At the moment, I rsync from the IP address : (your IP address here)

We only use the IP to check the logs before we add the mirror to the list. Once your mirror is on the list, you can change the IP of the mirror without notifying us.

Thanks!

Questions?

If you have any questions, please feel free to raise them in your issue tracker ticket (component "Mirrors") or on the mirror maintainers public mailing list mirrors@apache.org. You don't need to subscribe in order to post (but a short note in your signature that you request replied to be CC'd to you would help).