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