[[ClfsToc]] = CLFS HTTP Static Mirroring = [wiki:mirrors Go back to mirrors page] == How do I do it? == To be a CLFS Static HTTP mirror, you will need the following: * Apache Webserver or equivalent * Options !FollowSymlinks Indexes * 500MB free disk space * crontab program or similar There is a script below which you can use to rsync the website and associated data to your mirror. We recommend syncing twice an hour, at random minutes. Once you have the mirror ready to go, please contact Justin Knierim at admin@clfs.org with the information below. You can then be added to the mirrors list. Also should you have questions, feel free to ask. * URL * Connection Speed * Location (City, Country, or other location indicator) * Contact Information (Name, Email Address) == Website Rsync Scipt == There are many ways to setup the rsync of the website. A basic bash script is shown below, which will rsync the website and email you should there be any errors: {{{ #!/bin/sh SITE=clfs.org MODULE=clfs-www LOCAL=/path/to/mirror # Change this value USER=admin@domain.com # Change this value MAILER=/usr/sbin/sendmail # Change this value [ -d "$LOCAL" ] || mkdir -p $LOCAL OUTPUT=`rsync -clprtv --delete ${SITE}::${MODULE} ${LOCAL} 2>&1` if [ $? -ne 0 -o `echo -e "${OUTPUT}" | wc -l` -ne 4 ] ; then (echo -e "Subject: clfs.org mirror - Rsync Error\n"; echo -e "${OUTPUT}") | ${MAILER} ${USER}; fi }}} The most basic would be just running the rsync command directly in cron or fcron: {{{ rsync -clprt --delete clfs.org::clfs-www /path/to/mirror }}} [wiki:mirrors Go back to mirrors page]