summaryrefslogtreecommitdiff
path: root/puppet/modules/site_apache
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-11-15 01:02:25 -0800
committerelijah <elijah@riseup.net>2013-11-22 11:14:13 -0800
commit289a00a149ac08d01b8ee638620d8c2928966fa3 (patch)
treead30a87e4dd2c5bec05b6c8bf39fd7cdb49fbaff /puppet/modules/site_apache
parent970fcd5d3262735c8ae7979a462cd77bf270b108 (diff)
improvements to webapp deployment: allow for greater customization, allow for custom git source, improve apache config.
Diffstat (limited to 'puppet/modules/site_apache')
-rw-r--r--puppet/modules/site_apache/manifests/module/expires.pp4
-rw-r--r--puppet/modules/site_apache/templates/vhosts.d/leap_webapp.conf.erb8
2 files changed, 12 insertions, 0 deletions
diff --git a/puppet/modules/site_apache/manifests/module/expires.pp b/puppet/modules/site_apache/manifests/module/expires.pp
new file mode 100644
index 00000000..f73a5607
--- /dev/null
+++ b/puppet/modules/site_apache/manifests/module/expires.pp
@@ -0,0 +1,4 @@
+class site_apache::module::expires ( $ensure = present )
+{
+ apache::module { 'expires': ensure => $ensure }
+}
diff --git a/puppet/modules/site_apache/templates/vhosts.d/leap_webapp.conf.erb b/puppet/modules/site_apache/templates/vhosts.d/leap_webapp.conf.erb
index afc19782..a001552a 100644
--- a/puppet/modules/site_apache/templates/vhosts.d/leap_webapp.conf.erb
+++ b/puppet/modules/site_apache/templates/vhosts.d/leap_webapp.conf.erb
@@ -45,6 +45,14 @@
PassengerFriendlyErrorPages off
SetEnv TMPDIR /var/tmp
+ # Allow rails assets to be cached for a very long time (since the URLs change whenever the content changes)
+ <Location /assets/>
+ Header unset ETag
+ FileETag None
+ ExpiresActive On
+ ExpiresDefault "access plus 1 year"
+ </Location>
+
<% if (defined? @services) and (@services.include? 'monitor') -%>
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
PassengerEnabled off