web-svc: improve proxy config
This commit is contained in:
parent
84f9372410
commit
88e2c60888
@ -14,6 +14,8 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=tilecache:10m max_size=1g;
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
@ -23,8 +25,29 @@ server {
|
||||
ssl_certificate_key /etc/nginx/ssl/{{ domain }}.key;
|
||||
ssl_certificate /etc/nginx/ssl/{{ domain }}.crt;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_pass http://10.90.224.104:8080;
|
||||
location ~ /d/(.*) {
|
||||
proxy_pass http://10.90.224.104:8080/styles/basic-preview/$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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user