aboutsummaryrefslogtreecommitdiffstats
path: root/conf/nginx.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'conf/nginx.conf.example')
-rw-r--r--conf/nginx.conf.example19
1 files changed, 18 insertions, 1 deletions
diff --git a/conf/nginx.conf.example b/conf/nginx.conf.example
index 253024ca6..3742c1fdb 100644
--- a/conf/nginx.conf.example
+++ b/conf/nginx.conf.example
@@ -16,9 +16,26 @@ server {
root /var/www/fixmystreet/fixmystreet/web;
error_page 503 /down.html;
+ # Make sure that Javascript, CSS and HTML are compressed:
+ gzip on;
+ gzip_disable "msie6";
+ gzip_types application/javascript application/x-javascript text/css;
+
+ # Set a long expiry time for CSS and Javascript, and prevent
+ # the mangling of Javascript by proxies:
+ location ~ \.css$ {
+ expires 10y;
+ }
+
+ location ~ \.js$ {
+ add_header Cache-Control no-transform;
+ expires 10y;
+ try_files $uri @catalyst;
+ }
+
# These rewrite rules are ported from the Apache configuration in
# conf/httpd.conf
-
+
rewrite ^/rss/council/([0-9]+)$ /rss/reports/$1 permanent;
rewrite ^/report$ /reports permanent;
rewrite '^/{/rss/(.*)}$' /rss/$1 permanent;