cvsimport
[hcoop/zz_old/domtool2-proto.git] / lib / web_apps.dtl
CommitLineData
792f196d 1{{Configuring common web applications}}
2
3val addWordPress = \ loc : (location) ->
4 location loc with
792f196d 5 rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
6 rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
7 rewriteRule "." "/index.php" [last]
8 end;
9{{Add a standard WordPress blog set-up code to a virtual host. The WordPress
10 files should be rooted at the location you specify.}}
11
12val wordPress = \ host : (host) ->
13 web host with
14 addWordPress "/"
15 end;
16{{Create a WordPress blog with just the standard set-up code. The WordPress blog should
17 be rooted at the vhost's <tt>DocumentRoot</tt>.}}
18
19val addMoinMoin = begin
20 htdocs <- Htdocs;
21 prefix <- Prefix;
22 script <- Script;
23
24 alias htdocs "/usr/share/moin/htdocs";
61caeff8 25 scriptAlias prefix (end_in_slash script)
792f196d 26end;
27{{Add a MoinMoin wiki to a vhost.}}
28
29val moinMoin = \ host : (host) ->
30 web host with
31 addMoinMoin where
a9bfb1bf 32 Htdocs = "/moin";
792f196d 33 Prefix = "/"
34 end
35 end;
36{{Create a new vhost with just a MoinMoin wiki.}}