hcoop: move dispatcher to gibran
[hcoop/domtool2.git] / lib / web_apps.dtl
CommitLineData
18f63ec1
AC
1{{Configuring common web applications}}
2
3val addWordPress = \ loc : (location) ->
4 location loc with
a052bc91
CE
5 rewriteRule "^(.*/)?\.svn/" "-" [forbidden, last];
6 rewriteRule "^(.*/)?\.git/" "-" [forbidden, last];
7
18f63ec1
AC
8 rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
9 rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
a052bc91
CE
10
11 rewriteRule "." "/index.php" [last];
18f63ec1
AC
12 end;
13{{Add a standard WordPress blog set-up code to a virtual host. The WordPress
14 files should be rooted at the location you specify.}}
15
eb18bcac 16val wordPress = \ host : (host) -> \\ config : Vhost ->
18f63ec1 17 web host with
3fbbc260 18 addWordPress "/";
eb18bcac
CE
19 diskCache "/wp-content";
20 config
18f63ec1
AC
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
606bb55b 25val moin_default_htdocs : (location) = "/moin_static199";
5ea8643a
CE
26{{Alias for static content used by the system-wide MoinMoin.}}
27
18f63ec1
AC
28val addMoinMoin = begin
29 htdocs <- Htdocs;
30 prefix <- Prefix;
31 script <- Script;
32
606bb55b
CE
33 alias htdocs "/afs/hcoop.net/common/app/moin/installed/moin19/lib/python2.7/site-packages/MoinMoin/web/static/htdocs";
34 (*diskCache htdocs;*) (* disabled 2017-02-01 clinton : don't think this helps after all *)
3fbbc260 35 scriptAlias prefix (end_in_slash script);
18f63ec1
AC
36end;
37{{Add a MoinMoin wiki to a vhost.}}
38
eb18bcac 39val moinMoin = \ host : (host) -> \\ config : Vhost ->
18f63ec1
AC
40 web host with
41 addMoinMoin where
5ea8643a 42 Htdocs = moin_default_htdocs;
18f63ec1 43 Prefix = "/"
eb18bcac 44 end;
606bb55b 45 config
18f63ec1
AC
46 end;
47{{Create a new vhost with just a MoinMoin wiki.}}
5ea8643a
CE
48
49(* Legacy version of moin macros *)
50
51val addMoinMoinOld = begin
52 htdocs <- Htdocs;
53 prefix <- Prefix;
54 script <- Script;
55
56 alias htdocs "/usr/share/moin/htdocs";
57 scriptAlias prefix (end_in_slash script)
58end;
660f5874 59{{Add a MoinMoin wiki to a vhost.}}