From 74faa90556d55ff1e3b5586b6cacb46eb1f132a0 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Sat, 24 Feb 2024 00:33:24 +0100 Subject: [PATCH] nginx --- .../http_host_lib/templates/nginx_cf.conf | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) 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 {