switch2osm: add expiry matching github pages
authorGrant Slater <git@firefishy.com>
Sun, 8 Dec 2019 19:51:49 +0000 (19:51 +0000)
committerGrant Slater <git@firefishy.com>
Sun, 8 Dec 2019 19:51:49 +0000 (19:51 +0000)
cookbooks/switch2osm/recipes/default.rb
cookbooks/switch2osm/templates/default/apache.erb

index 8ddaf5101c7f1cac0a45bcd1956b4da4fcf730b1..3e0c51f9ce9f29722e66564d6f8ac249fe938c20 100644 (file)
@@ -25,6 +25,9 @@ package %w[
   zlib1g-dev
 ]
 
+apache_module "expires"
+apache_module "rewrite"
+
 gem_package "bundler" do
   version "1.17.3"
 end
index 7d73ca6e4adb55cae31a8e43b68861e6509d6ebf..e355c814c23a98c23a165f5b8c943c02ebe5026c 100644 (file)
@@ -17,6 +17,9 @@
    DocumentRoot <%= @directory %>
 
    ErrorDocument 404 /404.html
+
+   ExpiresActive On
+   ExpiresDefault "access plus 10 minutes"
 </VirtualHost>
 
 <VirtualHost *:80>