web-svc: improve proxy config

This commit is contained in:
Markus 2020-06-17 13:32:51 +02:00
parent 84f9372410
commit 88e2c60888

View File

@ -14,6 +14,8 @@ server {
} }
} }
proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=tilecache:10m max_size=1g;
server { server {
listen 443 ssl http2; listen 443 ssl http2;
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
@ -23,8 +25,29 @@ server {
ssl_certificate_key /etc/nginx/ssl/{{ domain }}.key; ssl_certificate_key /etc/nginx/ssl/{{ domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ domain }}.crt; ssl_certificate /etc/nginx/ssl/{{ domain }}.crt;
location / { location ~ /d/(.*) {
proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://10.90.224.104:8080/styles/basic-preview/$1;
proxy_pass http://10.90.224.104:8080;
proxy_cache tilecache;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_cache_valid 200 1d;
proxy_cache_valid any 1m;
proxy_ignore_headers Expires Cache-Control;
expires 7d;
}
location ~ /n/(.*) {
proxy_pass http://10.90.224.104:8080/styles/custom/$1;
proxy_cache tilecache;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_cache_valid 200 1d;
proxy_cache_valid any 1m;
proxy_ignore_headers Expires Cache-Control;
expires 7d;
} }
} }