From 18f63ec161049a7385dc4d2dab3771197a1058c1 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 18 Nov 2007 16:15:21 +0000 Subject: [PATCH] Web app shortcuts --- lib/web_apps.dtl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/web_apps.dtl diff --git a/lib/web_apps.dtl b/lib/web_apps.dtl new file mode 100644 index 0000000..f188c74 --- /dev/null +++ b/lib/web_apps.dtl @@ -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 DocumentRoot.}} + +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.}} -- 2.20.1