apache: use HTTP for mod_auth_kerb service principal
[hcoop/domtool2.git] / lib / web_apps.dtl
1 {{Configuring common web applications}}
2
3 val addWordPress = \ loc : (location) ->
4 location loc with
5 rewriteRule "^(.*/)?\.svn/" "-" [forbidden, last];
6 rewriteRule "^(.*/)?\.git/" "-" [forbidden, last];
7
8 rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
9 rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
10
11 rewriteRule "." "/index.php" [last];
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
16 val wordPress = \ host : (host) -> \\ config : Vhost ->
17 web host with
18 addWordPress "/";
19 diskCache "/wp-content";
20 config
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_static199";
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.7/site-packages/MoinMoin/web/static/htdocs";
34 (*diskCache htdocs;*) (* disabled 2017-02-01 clinton : don't think this helps after all *)
35 scriptAlias prefix (end_in_slash script);
36 end;
37 {{Add a MoinMoin wiki to a vhost.}}
38
39 val moinMoin = \ host : (host) -> \\ config : Vhost ->
40 web host with
41 addMoinMoin where
42 Htdocs = moin_default_htdocs;
43 Prefix = "/"
44 end;
45 config
46 end;
47 {{Create a new vhost with just a MoinMoin wiki.}}
48
49 (* Legacy version of moin macros *)
50
51 val 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)
58 end;
59 {{Add a MoinMoin wiki to a vhost.}}