Web app shortcuts
authorAdam Chlipala <adamc@hcoop.net>
Sun, 18 Nov 2007 16:15:21 +0000 (16:15 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sun, 18 Nov 2007 16:15:21 +0000 (16:15 +0000)
lib/web_apps.dtl [new file with mode: 0644]

diff --git a/lib/web_apps.dtl b/lib/web_apps.dtl
new file mode 100644 (file)
index 0000000..f188c74
--- /dev/null
@@ -0,0 +1,37 @@
+{{Configuring common web applications}}
+
+val addWordPress = \ loc : (location) ->
+  location loc with
+    rewriteBase "/";
+    rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
+    rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
+    rewriteRule "." "/index.php" [last]
+  end;
+{{Add a standard WordPress blog set-up code to a virtual host.  The WordPress
+  files should be rooted at the location you specify.}}
+
+val wordPress = \ host : (host) ->
+  web host with
+    addWordPress "/"
+  end;
+{{Create a WordPress blog with just the standard set-up code.  The WordPress blog should
+  be rooted at the vhost's <tt>DocumentRoot</tt>.}}
+
+val addMoinMoin = begin
+  htdocs <- Htdocs;
+  prefix <- Prefix;
+  script <- Script;
+
+  alias htdocs "/usr/share/moin/htdocs";
+  scriptAlias prefix script
+end;
+{{Add a MoinMoin wiki to a vhost.}}
+
+val moinMoin = \ host : (host) ->
+  web host with
+    addMoinMoin where
+      Htdocs = "moin";
+      Prefix = "/"
+    end
+  end;
+{{Create a new vhost with just a MoinMoin wiki.}}