Source

xemacsweb / Download / how-to-mirror-web.content

%title%
How to become a mirror of the XEmacs web site
%authors%
the Apache group
Andrew J Cosgriff
%main%

<h1>How to Become a Mirror of the XEmacs Web Site</h1>

<p>If you are in a part of the world which seems poorly served by our
existing mirror sites, we would encourage you to set up a local mirror
of the www.xemacs.org web site for you and others in your part of the
world to use.  So that others may find it, we'll list it on the
left-hand sidebar of our web pages.</p>

<h2>Requirements</h2>

<p>We have a few requirements for those wishing to run a mirror:</p>

<ul>
	    <li><p>You must carry the complete site, with no "local"
  changes.</p></li>

	    <li><p>You must do an update-check at least once per day.</p></li>

	    <li><p>You must subscribe to the <a
	    href="http://lists.xemacs.org/lists/listinfo/xemacs-mirrors" shape="rect">mailing
  list</a> for mirror maintainers.</p></li>

	    <li><p>Make sure your webserver looks for "index.html" as the
  default document in a directory - If you're running the Apache
  webserver, this means using the configuration directive :</p>
 
  <p><code>DirectoryIndex index.html</code>.</p></li>
	  </ul>

<p>More requirements may be placed at some point in the future, but
for now that's all there is.</p>

<p>Also note that :</p>

<ul>
  <li><p>The web site is approximately 20 megabytes at the time of
  writing (January 2001).</p></li>

  <li><p>We highly recommend that you run your mirroring software
  between midnight and 4am US Eastern Standard Time (4am-8am GMT),
  when traffic to www.xemacs.org is at its lowest.</p></li>

  <li><p>If possible, we'd prefer that you're able to have the website
  in its own virtual host so that we can make a host alias for it,
  like www.au.xemacs.org or www.us.xemacs.org, for instance.</p></li>
</ul>

<h2>Mirroring Techniques</h2>

<p>There are a couple different ways to mirror the XEmacs web site.
Here is the list of ways we make available, in order of decreasing
preference:</p>

<ol>

	    <li><p>Use rsync.  You can find details on rsync at <a
	    href="http://rsync.samba.org/" shape="rect">http://rsync.samba.org/</a>.  To mirror
the XEmacs website, you could use something like :</p>

<pre xml:space="preserve">rsync -avz --delete rsync.xemacs.org::xemacsweb /local/path/to/mirror</pre>

<p>You can also just do a <code>rsync rsync.xemacs.org::</code> to get a
list of rsync modules available.</p>

<p>You may also wich to read the <a
href="http://sunsite.dk/SunSITE/guides/rsync/rsync-mirroring.html"
shape="rect">rsync
mirroring howto and FAQ</a>.</p></li>


	    <li><p>Use CVS to update your copy of the website from the repository
at <a href="http://sourceforge.net/" shape="rect">SourceForge</a>.  You'll need
Perl installed in order to generate the web pages.  If you want to be
able to validate the web pages, you'll also need to install XEmacs
with the PSGML package.</p>

<p>To check out the web site for the first time :</p>

<pre xml:space="preserve">cvs -d:pserver:anonymous@cvs.xemacs.sourceforge.net:/cvsroot/xemacs login</pre>

<p>(For the password, simply hit Enter)</p>

<pre xml:space="preserve">cvs -z3 -d:pserver:anonymous@cvs.xemacs.sourceforge.net:/cvsroot/xemacs co xemacsweb</pre>

<p>Now <code>cd xemacsweb</code> and run <code>make</code>.</p>

<p>When you want to update the website :</p>

<pre xml:space="preserve">cd /path/to/your/mirror
cvs -q update
make</pre>

<p>(this can be put in a cron job, for instance)</p>
</li>


	    <li><p>If you're running the Apache webserver, you could
	    use the <a
	    href="http://www.apache.org/docs/mod/mod_proxy.html"
	    shape="rect">proxy module</a>
to "pass-through" requests to the central XEmacs web site.  Set up the
following in the configuration for your mirror:</p>

<pre xml:space="preserve">
ProxyPass / http://www.xemacs.org/
CacheDefaultExpire 24
</pre>

<p>Every request which then comes into this server will be passed
along to www.xemacs.org, unless the object is already in your local
cache and is less than 24 hours old.</p></li>

	  </ol>

<p>We do not recommend the use of Web spiders, or HTTP equivalents to
the "mirror.pl" package, as every object needs to get a HEAD request
every time it is checked, which is a very inefficient mechanism for
seeing what's been updated on an entire site.</p>

<p>It is not possible to mirror via ftp. The other methods are also far
more efficient so you will be pleased after setting them up.</p>

<h2>Inform us!</h2>

<p>Once the site is set up, send mail to <a
href="mailto:webmaster@xemacs.org" shape="rect">webmaster@xemacs.org</a> to let us
know it's been set up, and we'll add it to the list of mirrors.
Please be patient if it takes a little while to respond.</p>

<p>The mailing list for mirror maintainers can be joined by following
the <a href="http://lists.xemacs.org/lists/listinfo/xemacs-mirrors"
shape="rect">these
instructions</a>.</p>

<p>Good luck!</p>

<p><small>This document is a locally modified version of the one at
the <a href="http://www.apache.org/info/how-to-mirror.html"
shape="rect">Apache</a>
web site.  We appreciate their work in writing such a document in the
first place.</small></p>