Quite a few sites like to mirror the Samba ftp site, and sometimes the web site. The problem with these mirrors is that they can cost us an enormous amount in network charges. To try to minimise the costs, please consider the following.
If this mirror is for your personal use, then please reconsider. Otherwise, check to see if there is another mirror site within reasonable proximity to you already. If there is, then think about whether your mirror is really needed.
If you decide to go ahead and setup a mirror, then please contact us so we can add you to the list of available mirrors. Write to email@example.com.
Please don't be tempted to run your mirror script on an hourly basis. Once a day really is good enough for Samba.
If you want to mirror this site, then please join the firstname.lastname@example.org mailing list so you can be notified of changes in the site that require your attention. The list has very low traffic so it should not be a burden. See http://lists.samba.org/pipermail/mirrors/ for information on how to join the list.
You may also use this list to ask questions about mirroring problems with this site.
Please do NOT use ftp mirror scripts or web robots to mirror our site. Some of these mirroring systems are very inefficient. Not only do they take a long time to run, but they also use a lot more bandwidth than is necessary. Web mirror scripts are particularly bad.
If you do attempt to use a web robot then our automatic web robot detector will probably catch you and ban your entire site.
You can use anonymous rsync to obtain a copy of the [sambaftp] (minus the Binary_Packages download area) and [sambawww] repository. Please note that official mirror can make use of the [sambaftp-mirror] repository which includes the Binary_Packages/ directory. However, in order to do so, you must first obtain the current username and password for the share. To do this, please send email to email@example.com.
You can read more about rsync at http://rsync.samba.org/, but basically what you want to do is download rsync, compile it for your system then run something like this to do a mirror run:
rsync -az --delete --force mirror.samba.org::sambaftp/ ~ftp/pub/samba
This will also give you a much better quality mirror than other mirroring systems. The timestamps will be right to the second, symbolic links will be preserved, and all the permissions will be right.
If you want to mirror the Samba web pages, then it is especially important that you do not use a web robot. We have had endless problems with robots using enormous amounts of bandwidth by following infinite loops in the web pages or downloading stuff that it just isn't useful to have on a mirror site.
Instead, please join the mirrors mailing list mentioned above and ask on that list. Then, if you go ahead, please use rsync like this:
rsync -az --delete --exclude=ftp mirror.samba.org::sambawww/ /wwwmirrors/samba/
To complete the web mirror you will also need to mirror the ftp site as above then create a symbolic link from http://your.host.name/samba/ftp to the samba ftp area. Consult your web server and OS documentation about how to use symbolic links. Typicaly it involves something like this:
ln -s ~ftp/pub/samba /var/www/htdocs/samba/ftp
then you add the option "SymLinksIfOwnerMatch" to your Apache configuration. Note that this means that the symbolic link must be owned by the same user that owns the ftp directory.
The hostname of your web site mirror doesn't matter (you don't need to use virtual hosting) but please make the site available as http://your.host.name/samba/ so that internal references to /samba/ work.
NOTE: With the recent samba.org XHTML/CSS redesign (August 2004), http://samba.org continues to use the /samba/ link to maintain links across mirrors; however, http://samba.org/samba/ is the top most page in the site, not http://samba.org/samba/samba.html as was previously the case.
As with the ftp link, /samba/ should just be a link pointing back to the top most directory of samba webpages. This will effectively ensure that http://your.host.name/samba/ and http://your.host.name/ point to the same page (i.e. the top most index.html in the samba web pages directory.
samba.org now relies on CSS for handling presentation. You must ensure, then, that Apache is configured correctly for CSS. Usually, this is not a problem as Apache reads MIME types from the server's mime.types file. To ensure Apache correctly handles CSS, check your server's mime.types file for the following:
If the line does not exist, add it to the file. Or if you don't prefer to modify the mime.types file, add the following to your httpd.conf:
AddType text/css .css
Web pages should also be served with a simple MIME type of "text/html" rather than anything like "text/html; iso-8859-1" or "text/html; utf-8".
You must also ensure that your web server supports server side includes. To enable these under Apache you would use the option IncludesNOEXEC in an Options directive in a directory section.
A typical config for Apache serving the Samba web pages would be:
<Directory /var/www/htdocs/samba> XBitHack full AddHandler server-parsed .html Options IncludesNOEXEC Indexes SymLinksIfOwnerMatch AllowOverride None order allow,deny allow from all </Directory>
If you run a Samba web mirror site, then you can ask for a country alias in the samba.org domain for your site. Send mail to firstname.lastname@example.org.
You can customise your mirror of Samba by editing the files local_header.html and local_footer.html. If you do that, then remember to exclude those files from your rsync script or they will be overwritten.
Please keep customisations small and in keeping with the rest of the page.
If you have problems setting up your web mirror then please ask on the email@example.com mailing list or look in the list archives.