using tiles org

This commit is contained in:
Zsolt Ero
2023-12-31 16:46:11 +01:00
parent ae91fe58dc
commit 205a23071b
2 changed files with 9 additions and 9 deletions

View File

@@ -38,14 +38,14 @@ def cli():
print(f"{run_dir} doesn't exists, skipping")
continue
tilejson_path = run_dir / 'tilejson-tiles-com.json'
tilejson_path = run_dir / 'tilejson-tiles-org.json'
metadata_path = subdir / 'metadata.json'
if not metadata_path.is_file():
print(f"{metadata_path} doesn't exists, skipping")
continue
url_prefix = f'https://tiles.openfreemap.com/{area}/{version}'
url_prefix = f'https://tiles.openfreemap.org/{area}/{version}'
subprocess.run(
[
@@ -87,12 +87,12 @@ def cli():
curl_text = (
'\ntest with:\n'
f'curl -H "Host: ofm" -I http://localhost/{area}/{version}/14/8529/5975.pbf\n'
f'curl -I https://tiles.openfreemap.com/{area}/{version}/14/8529/5975.pbf'
f'curl -I https://tiles.openfreemap.org/{area}/{version}/14/8529/5975.pbf'
)
nginx_template = nginx_template.replace('___LOCATION_BLOCKS___', location_block_str)
with open('/data/nginx/sites/ofm-tiles-com.conf', 'w') as fp:
with open('/data/nginx/sites/ofm-tiles-org.conf', 'w') as fp:
fp.write(nginx_template)
print('nginx config written')

View File

@@ -1,5 +1,5 @@
server {
server_name ofm tiles.openfreemap.com;
server_name ofm tiles.openfreemap.org;
# ssl: https://ssl-config.mozilla.org / modern config
# to be used with the Cloudflare proxied endpoint
@@ -9,8 +9,8 @@ server {
listen [::]:443 ssl;
http2 on;
ssl_certificate /data/nginx/certs/openfreemap.com.pem;
ssl_certificate_key /data/nginx/certs/openfreemap.com.key;
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_tickets off;
@@ -18,10 +18,10 @@ server {
ssl_prefer_server_ciphers off;
# access log normally not enabled
#access_log /data/ofm/http_host/logs_nginx/tiles-com-access.log access_json buffer=32k;
#access_log /data/ofm/http_host/logs_nginx/tiles-org-access.log access_json buffer=32k;
access_log off;
error_log /data/ofm/http_host/logs_nginx/tiles-com-error.log;
error_log /data/ofm/http_host/logs_nginx/tiles-org-error.log;
___LOCATION_BLOCKS___