Use mod_disk_cache for wordpress wp-content and moin static files
[hcoop/domtool2.git] / lib / web_apps.dtl
index 5d4da16..76ef7ac 100644 (file)
@@ -3,16 +3,21 @@
 val addWordPress = \ loc : (location) ->
   location loc with
     phpVersion php5;
+    rewriteRule "^(.*/)?\.svn/" "-" [forbidden, last];
+    rewriteRule "^(.*/)?\.git/" "-" [forbidden, last];
+
     rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
     rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
-    rewriteRule "." "/index.php" [last]
+
+    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 "/"
+    addWordPress "/";
+    diskCache "/wp-content"
   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>.}}
@@ -26,7 +31,8 @@ val addMoinMoin = begin
   script <- Script;
 
   alias htdocs "/afs/hcoop.net/common/app/moin/installed/moin19/lib/python2.6/site-packages/MoinMoin/web/static/htdocs";
-  scriptAlias prefix (end_in_slash script)
+  diskCache htdocs;
+  scriptAlias prefix (end_in_slash script);
 end;
 {{Add a MoinMoin wiki to a vhost.}}
 
@@ -49,13 +55,4 @@ val addMoinMoinOld = begin
   alias htdocs "/usr/share/moin/htdocs";
   scriptAlias prefix (end_in_slash script)
 end;
-{{Add a MoinMoin wiki to a vhost.}}
-
-val moinMoinOld = \ host : (host) ->
-  webAt "mire" host with
-    addMoinMoinOld where
-      Htdocs = "/moin";
-      Prefix = "/"
-    end
-  end;
-{{Create a new vhost with just a MoinMoin wiki.}}
\ No newline at end of file
+{{Add a MoinMoin wiki to a vhost.}}
\ No newline at end of file