diff --git a/config/nginx.conf b/config/nginx.conf index 82ad28b..de27801 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -1,3 +1,9 @@ +# Expires map +map $sent_http_content_type $expires { + default off; + ~image/ max; +} + # # --- Stable docs -------------------------------------------------------------- # @@ -5,6 +11,7 @@ server { server_name api.rubyonrails.org; gzip_static on; + expires $expires; location ~ ^/v\d { root /home/rails/api; @@ -38,6 +45,7 @@ server { server { server_name guides.rubyonrails.org; gzip_static on; + expires $expires; rewrite /contributing_to_rails.html /contributing_to_ruby_on_rails.html permanent; rewrite /contribute.html /contributing_to_ruby_on_rails.html permanent; @@ -79,6 +87,7 @@ server { server { server_name edgeapi.rubyonrails.org; gzip_static on; + expires $expires; root /home/rails/api/edge; index index.html; @@ -95,6 +104,7 @@ server { server { server_name edgeguides.rubyonrails.org; gzip_static on; + expires $expires; rewrite /contributing_to_rails.html /contributing_to_ruby_on_rails.html permanent; rewrite /contribute.html /contributing_to_ruby_on_rails.html permanent;