From: Grant Slater Date: Sun, 31 Jan 2016 22:39:42 +0000 (+0000) Subject: Imagery - restart nginx on fragment change X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/be85823d780f36df6cda0403657854597ffcd936 Imagery - restart nginx on fragment change --- diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index 25bcd7b4b..340ed0b6c 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -100,3 +100,7 @@ action :delete do action :delete end end + +def after_created + notifies :restart, "service[nginx]" +end diff --git a/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb b/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb index 18be9f533..041870b6a 100644 --- a/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb @@ -5,6 +5,7 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" { fastcgi_param QUERY_STRING "map=/srv/imagery/mapserver/layer-<%= @layer %>.map&mode=tile&layers=<%= @layer %>&tilemode=gmap&tile=$2+$3+$1"; fastcgi_pass "unix:/var/run/mapserver-fastcgi/layer-<%= @layer %>.socket"; include fastcgi_params; + gzip off; }