Answer the question
In order to leave comments, you need to log in
Nginx as a proxy for OSM does not save tiles, how to fix it?
nginx is configured to proxy requests to openstreetmap servers.
config below
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=osm_cache:100m max_size=2g inactive=100d use_temp_path=off;
upstream openstreetmap_backend {
server a.tile.openstreetmap.org;
server b.tile.openstreetmap.org;
server c.tile.openstreetmap.org;
}
server {
....
location /osm/ {
access_log /var/log/nginx/access_osm.log;
proxy_cache osm_cache;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504 http_429;
proxy_cache_background_update on;
proxy_cache_lock on;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_valid 200 302 20d;
proxy_cache_valid any 5m;
proxy_cache_key "$request_uri";
proxy_pass http://openstreetmap_backend/;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question