caasd
[metze/test/web/.git] / mirroring.html
1 <!--#include virtual="/samba/header.html" --> 
2   <title>Mirroring Samba</title>
3 <!--#include virtual="/samba/header_columns.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. 
17 If there is, then think 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 add you to the list of available mirrors. Write to 
23 <a href="mailto:webmaster@samba.org">webmaster@samba.org</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. </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>You 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>You can use anonymous rsync to obtain a copy of the [sambaftp]
53 (minus the Binary_Packages download area) and [sambawww] repository.
54 Please note that official mirror can make use of the [sambaftp-mirror]
55 repository which includes the Binary_Packages/ directory.  However, in 
56 order to do so, you must first obtain the current username and password
57 for the share.  To do this, please send email to <a 
58 href="mailto:webmaster@samba.org">webmaster@samba.org</a>.
59 </p>
60
61 <p>You can read more about rsync at <a
62 href="http://rsync.samba.org/">http://rsync.samba.org/</a>,
63 but basically what you want to do is <a
64 href="ftp://samba.org/pub/rsync/">download rsync</a>, compile
65 it for your system then run something like this to do a mirror run:</p>
66
67 <pre>
68 rsync -az --delete --force mirror.samba.org::sambaftp/ ~ftp/pub/samba
69 </pre>
70
71 <p>This will also give you a much better quality mirror than other
72 mirroring systems. The timestamps will be right to the second,
73 symbolic links will be preserved, and all the permissions will be
74 right.</p>
75
76 <h3>Mirroring Web Pages</h3>
77
78 <p>If you want to mirror the Samba web pages, then it is especially
79 important that you do not use a web robot. We have had endless
80 problems with robots using enormous amounts of bandwidth by following
81 infinite loops in the web pages or downloading stuff that it just isn't
82 useful to have on a mirror site.</p>
83
84 <p>Instead, please join the mirrors mailing list mentioned above and ask
85 on that list. Then, if you go ahead, please use rsync like this:</p>
86
87 <pre>
88 rsync -az --delete --exclude=ftp  mirror.samba.org::sambawww/ /wwwmirrors/samba/
89 </pre>
90
91 <p>To complete the web mirror you will also need to mirror the ftp site
92 as above then create a symbolic link from
93 http://your.host.name/samba/ftp to the samba ftp area. Consult your
94 web server and OS documentation about how to use symbolic
95 links. Typicaly it involves something like this:</p>
96
97 <pre>
98 ln -s ~ftp/pub/samba /var/www/htdocs/samba/ftp
99 </pre>
100
101 <p>then you add the option "SymLinksIfOwnerMatch" to your Apache
102 configuration. Note that this means that the symbolic link
103 <em>must</em> be owned by the same user that owns the ftp directory.</p>
104
105 <p>The hostname of your web site mirror doesn't matter (you don't need to
106 use virtual hosting) but please make the site available as
107 http://your.host.name/samba/ so that internal references to /samba/
108 work.</p>
109
110 <blockquote>
111 <b>NOTE:</b> With the recent samba.org XHTML/CSS redesign (August 2004), 
112 http://samba.org continues to use the /samba/ link to maintain links across
113 mirrors; however, http://samba.org/samba/ is the top most page in the site, not 
114 http://samba.org/samba/samba.html as was previously the case.
115
116 <p>As with the ftp link, /samba/ should just be a link pointing back to the
117 top most directory of samba webpages.  This will effectively ensure that 
118 http://your.host.name/samba/ and http://your.host.name/ point to the same
119 page (i.e. the top most index.html in the samba web pages directory.</p>
120 </blockquote> 
121
122 <h3>MIME Types</h3>
123
124 <p>samba.org now relies on CSS for handling presentation.  You must ensure,
125 then, that Apache is configured correctly for CSS.  Usually, this is not
126 a problem as Apache reads MIME types from the server's mime.types file.  To
127 ensure Apache correctly handles CSS, check your server's mime.types file for
128 the following:</p>
129
130 <pre>
131 text/css        css
132 </pre>
133
134 <p>If the line does not exist, add it to the file.  Or if you don't prefer
135 to modify the mime.types file, add the following to your httpd.conf:</p>
136
137 <pre>
138 AddType text/css .css
139 </pre>
140
141 <p>Web pages should also be served with a simple MIME type of "text/html"
142 rather than anything like "text/html; iso-8859-1" or "text/html; utf-8".</p>
143  
144 <h3>Server Side Includes</h3>
145
146 <p>You must also ensure that your web server supports server side
147 includes. To enable these under Apache you would use the option
148 IncludesNOEXEC in an Options directive in a directory section.</p>
149
150 <h3>Example Config</h3>
151
152 <p>A typical config for Apache serving the Samba web pages would be:</p>
153
154 <pre>
155   &lt;Directory /var/www/htdocs/samba&gt;
156         XBitHack full
157         AddHandler server-parsed .html
158         Options IncludesNOEXEC Indexes SymLinksIfOwnerMatch
159         AllowOverride None
160         order allow,deny
161         allow from all
162   &lt;/Directory&gt;
163 </pre>
164
165
166 <h3>Country Alias</h3>
167
168 <p>If you run a Samba web mirror site, then you can ask for a country
169 alias in the samba.org domain for your site. Send mail to <a
170 href="mailto:webmaster@samba.org">webmaster@samba.org</a>.</p>
171
172 <h3>Local Customisation</h3>
173
174 <p>You can customise your mirror of Samba by editing the files
175 local_header.html and local_footer.html. If you do that, then remember
176 to exclude those files from your rsync script or they will be
177 overwritten.</p>
178
179 <p>Please keep customisations small and in keeping with the rest of the
180 page.</p> 
181
182 <h3>List Archives</h3>
183
184 <p>If you have problems setting up your web mirror then please ask on the
185 mirrors@samba.org mailing list or look in the <a
186 href="http://lists.samba.org/pipermail/mirrors/">list archives</a>.</p>
187
188 <!--#include virtual="/samba/footer.html" -->