mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
using tiles org
This commit is contained in:
@@ -38,14 +38,14 @@ def cli():
|
|||||||
print(f"{run_dir} doesn't exists, skipping")
|
print(f"{run_dir} doesn't exists, skipping")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tilejson_path = run_dir / 'tilejson-tiles-com.json'
|
tilejson_path = run_dir / 'tilejson-tiles-org.json'
|
||||||
|
|
||||||
metadata_path = subdir / 'metadata.json'
|
metadata_path = subdir / 'metadata.json'
|
||||||
if not metadata_path.is_file():
|
if not metadata_path.is_file():
|
||||||
print(f"{metadata_path} doesn't exists, skipping")
|
print(f"{metadata_path} doesn't exists, skipping")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
url_prefix = f'https://tiles.openfreemap.com/{area}/{version}'
|
url_prefix = f'https://tiles.openfreemap.org/{area}/{version}'
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
@@ -87,12 +87,12 @@ def cli():
|
|||||||
curl_text = (
|
curl_text = (
|
||||||
'\ntest with:\n'
|
'\ntest with:\n'
|
||||||
f'curl -H "Host: ofm" -I http://localhost/{area}/{version}/14/8529/5975.pbf\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)
|
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)
|
fp.write(nginx_template)
|
||||||
print('nginx config written')
|
print('nginx config written')
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
server_name ofm tiles.openfreemap.com;
|
server_name ofm tiles.openfreemap.org;
|
||||||
|
|
||||||
# ssl: https://ssl-config.mozilla.org / modern config
|
# ssl: https://ssl-config.mozilla.org / modern config
|
||||||
# to be used with the Cloudflare proxied endpoint
|
# to be used with the Cloudflare proxied endpoint
|
||||||
@@ -9,8 +9,8 @@ server {
|
|||||||
listen [::]:443 ssl;
|
listen [::]:443 ssl;
|
||||||
http2 on;
|
http2 on;
|
||||||
|
|
||||||
ssl_certificate /data/nginx/certs/openfreemap.com.pem;
|
ssl_certificate /data/nginx/certs/openfreemap.org.cert;
|
||||||
ssl_certificate_key /data/nginx/certs/openfreemap.com.key;
|
ssl_certificate_key /data/nginx/certs/openfreemap.org.key;
|
||||||
ssl_session_timeout 1d;
|
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_session_tickets off;
|
||||||
@@ -18,10 +18,10 @@ server {
|
|||||||
ssl_prefer_server_ciphers off;
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
# access log normally not enabled
|
# 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;
|
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___
|
___LOCATION_BLOCKS___
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user