74d30c33de461fb59e35d9e734a351363b1a61ae
[monkeysphere.git] / website / mirrors.mdwn
1 [[!meta title="Mirroring the Monkeysphere web site"]]
2
3 # Mirroring the Monkeysphere web site #
4
5 In keeping with the distributed philosophy of distributed development, our web site is
6 stored in our git repositories and converted into html by
7 [ikiwiki](http://ikiwiki.info/).
8
9 We're mirrored on several servers. Rather than using ikiwiki's [pinger/pingee
10 approach to distribution](http://ikiwiki.info/tips/distributed_wikis/), we've
11 opted for a simpler rsync of the ikiwiki-produced html files. 
12
13 ## Initial steps to take on the mirror server ##
14
15 Create a new user. 
16
17 Add web site configuration that the user has write access to. If you are
18 using Apache, include the following rewrite:
19
20     RewriteEngine On
21     RewriteCond %{HTTP_HOST} !^(YOURHOSTNAME|web)\.monkeysphere\.info$ [NC]
22     RewriteCond %{HTTP_HOST} !^$
23     RewriteRule ^/(.*) http://web.monkeysphere.info/$1 [L,R]
24
25 Add `webmaster@george`'s public key to this user's
26 `~/.ssh/authorized_keys` file, restricting that user to rsync (modify
27 path to web directory as needed):
28
29     command="/usr/bin/rsync --server -vlogDtprz --delete . web/",no-pty,no-agent-forwarding,no-port-forwarding ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0SCD6tAh7g1yyuelIm5zyh5OFX89NNbpNzyp+BxXNxMc/C1BS9SN5KlNDT30WdDbw3X0St0dBBC69TZWYbSUn4+/6BNmYpLH2orhedBv4w2jBLmtVEfnMWa3a11CnIagMEkEz7rBIWpl76WOqzoueQbAAa/7GziVmv+2qdjcDFxHluO+VL/+gEw8BqZc587oiDYkIw3oBnOLaxUWDtaMFKiL8sgdBmPxzc8PgHxL5ezVDJExw5krR4FK7hG7KpBOlSwKQPFy2pPhHSb1ZuFJmp2kr2wfJ0RO7By5s/GbrkJbnGoiJ5W0fUC9YoI82U3svC5saowvoSo19yToJW4QUw== webmaster@george
30
31 ## Admin steps to take to enable the configuration ##
32
33 Add a new dns record for SERVERNAME.monkeysphere.info. 
34
35 If the mirror server is not participating in the monkeysphere, add the
36 server to webmaster's known host file.
37
38 Add the new server to `webmaster@george:~/mirrors` in the format:
39
40     username@server:directory
41
42 Test by manually running the git post-receive hook as
43 `webmaster@george`:
44
45     ~/monkeysphere.git/hooks/post-receive
46
47 Add a new `A` record into the `web.monkeysphere.info` round robin.