mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
nginx
This commit is contained in:
@@ -31,9 +31,11 @@ def cli():
|
|||||||
area, version = subdir.name.split('-')
|
area, version = subdir.name.split('-')
|
||||||
|
|
||||||
version_str = rf"""
|
version_str = rf"""
|
||||||
location /{area}/{version}/ {{
|
location /{area}/{version}/ {{ # trailing hash important
|
||||||
alias {subdir};
|
alias {subdir}/; # trailing hash important
|
||||||
try_files $uri @empty;
|
try_files $uri @empty;
|
||||||
|
|
||||||
|
autoindex on;
|
||||||
}}
|
}}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -52,7 +54,7 @@ def cli():
|
|||||||
print('nginx config written')
|
print('nginx config written')
|
||||||
|
|
||||||
subprocess.run(['nginx', '-t'], check=True)
|
subprocess.run(['nginx', '-t'], check=True)
|
||||||
subprocess.run(['service', 'nginx', 'reload'], check=True)
|
subprocess.run(['systemctl', 'reload', 'nginx'], check=True)
|
||||||
|
|
||||||
print(help_text)
|
print(help_text)
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ http {
|
|||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
# TODO add application/vnd.mapbox-vector-tile
|
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
|
types {
|
||||||
|
application/vnd.mapbox-vector-tile pbf;
|
||||||
|
}
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|||||||
Reference in New Issue
Block a user