Add back mirroring instructions to the main page.
[metze/test/web/.git] / mirroring.html
1 <!--#include virtual="/samba/header.html" --> 
2   <title>Mirroring Samba</title>
3 <!--#include virtual="/samba/header2.html" -->
4
5 <h2>Mirroring Samba</h2>
6
7 <p>Quite a few sites like to mirror the Samba ftp site, and sometimes the
8 web site. The problem with these mirrors is that they can cost us an
9 enormous amount in network charges. To try to minimise the costs
10 please consider the following.</p>
11
12 <h3>Is it needed?</h3>
13
14 <p>If this mirror is for your personal use then please
15 reconsider. Otherwise check to see if there is
16 another mirror site within reasonable proximity to you already. If there is then think
17 about whether your mirror is really needed.</p>
18
19 <h3>Ask first</h3>
20
21 <p>If you decide to go ahead and setup a mirror then please contact
22 us so we can then add you to the list of available mirrors. Write to the
23 <a href="mailto:mirrors-owner@samba.org">mirror owner</a>.</p>
24
25 <h3>Not too often</h3>
26
27 <p>Please don't be tempted to run your mirror script on an hourly
28 basis. Once a day really is good enough for Samba stuff. </p>
29
30 <h3>Join the mirrors@samba.org list</h3>
31
32 <p>If you want to mirror this site then please join the
33 mirrors@samba.org mailing list so you can be notified of
34 changes in the site that require your attention. The list has very low
35 traffic so it should not be a burden. See 
36 <a href="http://lists.samba.org/pipermail/mirrors/">
37 http://lists.samba.org/pipermail/mirrors/</a> for information on how to join the list.</p>
38
39 <p> may also use this list to ask questions about mirroring problems
40 with this site. </p>
41
42 <h3>Use anonymous rsync</h3>
43
44 <p>Please do NOT use ftp mirror scripts or web robots to mirror our
45 site. Some of these mirroring systems are very inefficient. Not
46 only do they take a long time to run but they also use a lot more
47 bandwidth than is necessary. Web mirror scripts are particularly bad.</p>
48
49 <p>If you do attempt to use a web robot then our automatic web robot
50 detector will probably catch you and ban your entire site.</p>
51
52 <p>Instead, please use anonymous rsync. You can read more about rsync at
53 <a
54 href="http://samba.org/rsync/">http://samba.org/rsync/</a>,
55 but basically what you want to do is <a
56 href="ftp://samba.org/pub/rsync/">download rsync</a>, compile
57 it for your system then run something like this to do a mirror run:</p>
58
59 <pre><small>
60 rsync -az --delete --force mirror.samba.org::sambaftp/ ~ftp/pub/samba
61 </small></pre>
62
63 <p>This will also give you a much better quality mirror than other
64 mirroring systems. The timestamps will be right to the second,
65 symbolic links will be preserved and all the permissions will be
66 right.</p>
67
68 <h3>Mirroring the web pages</h3>
69
70 <p>If you want to mirror the Samba web pages then it is especially
71 important that you do not use a web robot. We have had endless
72 problems with robots using enormous amounts of bandwidth by following
73 infinite loops in the web pages or downloading stuff that it just isn't
74 useful to have on a mirror site.</p>
75
76 <p>Instead, please join the mirrors mailing list mentioned above and ask
77 on that list. Then if you go ahead please use rsync like this:</p>
78
79 <pre><small>
80 rsync -az --delete --exclude=ftp mirror.samba.org::sambawww/ /wwwmirrors/samba/
81 </small></pre>
82
83 <p>To complete the web mirror you will also need to mirror the ftp site
84 as above then create a symbolic link from
85 http://your.host.name/samba/ftp to the samba ftp area. Consult your
86 web server and OS documentation about how to use symbolic
87 links. Typicaly it involves something like this:</p>
88
89 <pre><small>
90 ln -s ~ftp/pub/samba /var/www/htdocs/samba/ftp
91 </small></pre>
92
93 </p>then you add the option "SymLinksIfOwnerMatch" to your apache
94 configuration. Note that this means that the symbolic link
95 <em>must</em> be owned by the same user that owns the ftp directory.</p>
96
97 <p>The hostname of your web site mirror doesn't matter (you don't need to
98 use virtual hosting) but please make the site available as
99 http://your.host.name/samba/ so that internal references to /samba/
100 work.</p>
101
102 <h3>Server side includes</h3>
103
104 <p>You must also ensure that your web server supports server side
105 includes. To enable these under apache you would use the option
106 IncludesNOEXEC in an Options directive in a directory section.</p>
107
108 <h3>Example config</h3>
109
110 <p>A typical config for apache serving the Samba web pages would be</p>
111
112 <pre><small>
113   &lt;Directory /var/www/htdocs/samba&gt;
114         XBitHack full
115         AddHandler server-parsed .html
116         Options IncludesNOEXEC Indexes SymLinksIfOwnerMatch
117         AllowOverride None
118         order allow,deny
119         allow from all
120   &lt;/Directory&gt;
121 </small></pre>
122
123
124 <h3>Country Alias</h3>
125
126 <p>If you run a Samba web mirror site then you can ask for a country
127 alias in the samba.org domain for your site. Send mail to <a
128 href="mailto:mirrors-owner@samba.org">mirrors owner</a>.</p>
129
130 <h3>Local Customisation</h3>
131
132 <p>You can customise your mirror of Samba by editing the files
133 local_header.html and local_footer.html. If you do that then remember
134 to exclude those files from your rsync script or they will be
135 overwritten.</p>
136
137 <p>Please keep customisations small and in keeping with the rest of the
138 page.</p> 
139
140 <h3>List archives</h3>
141
142 <p>If you have problems setting up your web mirror then please ask on the
143 mirrors@samba.org mailing list or look in the <a
144 href="http://lists.samba.org/pipermail/mirrors/">list archives</a>.</p>
145
146 <!--#include virtual="/samba/footer.html" -->