[Mageia-sysadm] [194] - add a hook to serve static file with apache directly

root at mageia.org root at mageia.org
Mon Nov 8 01:18:44 CET 2010


Revision: 194
Author:   misc
Date:     2010-11-08 01:18:44 +0100 (Mon, 08 Nov 2010)
Log Message:
-----------
- add a hook to serve static file with apache directly

Modified Paths:
--------------
    puppet/modules/apache/manifests/init.pp
    puppet/modules/apache/templates/vhost_catalyst_app.conf

Modified: puppet/modules/apache/manifests/init.pp
===================================================================
--- puppet/modules/apache/manifests/init.pp	2010-11-07 23:36:49 UTC (rev 193)
+++ puppet/modules/apache/manifests/init.pp	2010-11-08 00:18:44 UTC (rev 194)
@@ -82,7 +82,7 @@
         }
     }
 
-    define vhost_catalyst_app($script, $process = 4, $use_ssl = false) {
+    define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false) {
 
         include apache::mod_fastcgi 
 

Modified: puppet/modules/apache/templates/vhost_catalyst_app.conf
===================================================================
--- puppet/modules/apache/templates/vhost_catalyst_app.conf	2010-11-07 23:36:49 UTC (rev 193)
+++ puppet/modules/apache/templates/vhost_catalyst_app.conf	2010-11-08 00:18:44 UTC (rev 194)
@@ -2,7 +2,9 @@
         ServerName <%= name %>
         # Serve static content directly
         DocumentRoot  /dev/null
-
+<% if location then %>
+        Alias /static <%= location %>/root/static
+<% endif %>
         Alias / <%= script %>/
         FastCgiServer <%= script %> -processes <%= process %> -idle-timeout 30
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101108/017de46d/attachment.html>


More information about the Mageia-sysadm mailing list