nginx config example to cache tiles up to level 12 for a day.
This commit is contained in:
parent
4f44cc0e56
commit
1faaa6e7b4
22
deployment/config/nginx.conf
Normal file
22
deployment/config/nginx.conf
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
events {}
|
||||||
|
http {
|
||||||
|
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:10m
|
||||||
|
inactive=24h max_size=1g;
|
||||||
|
server {
|
||||||
|
location ~* ^/tiles/\d[012]?/[^?]+$ {
|
||||||
|
proxy_pass http://portal:3000;
|
||||||
|
proxy_set_header Host $host:3000;
|
||||||
|
proxy_buffering on;
|
||||||
|
proxy_cache_methods GET HEAD;
|
||||||
|
proxy_cache STATIC;
|
||||||
|
proxy_cache_valid 200 1d;
|
||||||
|
proxy_cache_use_stale error timeout invalid_header updating
|
||||||
|
http_500 http_502 http_503 http_504;
|
||||||
|
}
|
||||||
|
location / {
|
||||||
|
proxy_pass http://portal:3000;
|
||||||
|
proxy_set_header Host $host:3000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue