mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
nginx work
This commit is contained in:
@@ -12,12 +12,12 @@ server {
|
||||
ssl_certificate /data/nginx/certs/openfreemap.org.cert;
|
||||
ssl_certificate_key /data/nginx/certs/openfreemap.org.key;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
||||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
||||
ssl_session_tickets off;
|
||||
ssl_protocols TLSv1.3;
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
# access log normally not enabled
|
||||
# access log disabled by default
|
||||
#access_log /data/ofm/http_host/logs_nginx/tiles-org-access.log access_json buffer=32k;
|
||||
access_log off;
|
||||
|
||||
@@ -25,6 +25,17 @@ server {
|
||||
|
||||
___LOCATION_BLOCKS___
|
||||
|
||||
location /fonts/ {
|
||||
# trailing hash
|
||||
alias /data/ofm/http_host/assets/fonts/; # trailing hash
|
||||
try_files $uri =404;
|
||||
default_type application/x-protobuf;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header Cache-Control public;
|
||||
expires 1d; # target 1w
|
||||
}
|
||||
|
||||
# we need to handle missing tiles as valid request returning empty string
|
||||
location @empty {
|
||||
default_type application/vnd.mapbox-vector-tile;
|
||||
@@ -34,4 +45,13 @@ server {
|
||||
add_header Cache-Control public;
|
||||
expires 10y;
|
||||
}
|
||||
|
||||
location = / {
|
||||
return 302 https://openfreemap.org;
|
||||
}
|
||||
|
||||
# catch-all block to deny all other requests
|
||||
location / {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user