diff --git a/scripts/http_host/http_host_lib/templates/nginx_cf.conf b/scripts/http_host/http_host_lib/templates/nginx_cf.conf index b0bb2cf..81c7982 100644 --- a/scripts/http_host/http_host_lib/templates/nginx_cf.conf +++ b/scripts/http_host/http_host_lib/templates/nginx_cf.conf @@ -25,6 +25,18 @@ server { ___LOCATION_BLOCKS___ + location /fonts/ { + # trailing slash + + alias /data/ofm/http_host/assets/fonts/ofm/; # trailing slash + try_files $uri =404; + + expires 1w; + + add_header 'Access-Control-Allow-Origin' '*' always; + add_header Cache-Control public; + } + location /styles/ { # trailing slash @@ -38,13 +50,13 @@ server { add_header Cache-Control public; } - location /fonts/ { + location /natural_earth/ { # trailing slash - alias /data/ofm/http_host/assets/fonts/; # trailing slash + alias /data/ofm/http_host/assets/natural_earth/ofm/; # trailing slash try_files $uri =404; - expires 1w; + expires 10y; add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public; @@ -62,17 +74,7 @@ server { add_header Cache-Control public; } - location /ne2_shaded/ { - # trailing slash - alias /data/ofm/http_host/assets/natural_earth/tiles/natural_earth_2_shaded_relief.raster/; # trailing slash - try_files $uri =404; - - expires 10y; - - add_header 'Access-Control-Allow-Origin' '*' always; - add_header Cache-Control public; - } # we need to handle missing tiles as valid request returning empty string location @empty_tile {