From: Adam Chlipala Date: Sun, 18 Nov 2007 16:15:21 +0000 (+0000) Subject: Web app shortcuts X-Git-Tag: release_2010-11-19~121 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/18f63ec161049a7385dc4d2dab3771197a1058c1?hp=48ee2f672d8ec465d9358c0333509f7db6807274 Web app shortcuts --- 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.}}