Serve moin 1.9.8 htdocs prefix with apache
[hcoop/domtool2.git] / lib / web_apps.dtl
1 {{Configuring common web applications}}
2
3 val addWordPress = \ loc : (location) ->
4 location loc with
5 phpVersion php5;
6 rewriteRule "^(.*/)?\.svn/" "-" [forbidden, last];
7 rewriteRule "^(.*/)?\.git/" "-" [forbidden, last];
8
9 rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
10 rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
11
12 rewriteRule "." "/index.php" [last];
13 end;
14 {{Add a standard WordPress blog set-up code to a virtual host. The WordPress
15 files should be rooted at the location you specify.}}
16
17 val wordPress = \ host : (host) ->
18 web host with
19 addWordPress "/";
20 diskCache "/wp-content"
21 end;
22 {{Create a WordPress blog with just the standard set-up code. The WordPress blog should
23 be rooted at the vhost's <tt>DocumentRoot</tt>.}}
24
25 val moin_default_htdocs : (location) = "/moin_static198";
26 {{Alias for static content used by the system-wide MoinMoin.}}
27
28 val addMoinMoin = begin
29 htdocs <- Htdocs;
30 prefix <- Prefix;
31 script <- Script;
32
33 alias htdocs "/afs/hcoop.net/common/app/moin/installed/moin19/lib/python2.6/site-packages/MoinMoin/web/static/htdocs";
34 diskCache htdocs;
35 scriptAlias prefix (end_in_slash script);
36 end;
37 {{Add a MoinMoin wiki to a vhost.}}
38
39 val moinMoin = \ host : (host) ->
40 web host with
41 addMoinMoin where
42 Htdocs = moin_default_htdocs;
43 Prefix = "/"
44 end
45 end;
46 {{Create a new vhost with just a MoinMoin wiki.}}
47
48 (* Legacy version of moin macros *)
49
50 val addMoinMoinOld = begin
51 htdocs <- Htdocs;
52 prefix <- Prefix;
53 script <- Script;
54
55 alias htdocs "/usr/share/moin/htdocs";
56 scriptAlias prefix (end_in_slash script)
57 end;
58 {{Add a MoinMoin wiki to a vhost.}}