@@ -9,39 +9,43 @@ events {
99}
1010
1111http {
12- #
13- # Uncomment the lines below to enable response caching
14- #
15- #proxy_cache_path /var/cache/nginx keys_zone=mycache:10m max_size=50g levels=1:2 inactive=1h;
16- #proxy_cache_valid 200 302 15m;
17- #proxy_cache_valid 404 1m;
18- #map $http_cache_control $cache_bypass {
19- # no-cache 1;
20- #}
21- #proxy_cache_bypass $cache_bypass;
12+ proxy_cache_path /var/cache/nginx keys_zone=mycache:512m max_size=100g levels=1:2 inactive=1h
13+ loader_sleep=10ms manager_files=4000 manager_threshold=200m manager_sleep=100ms ;
14+ map $http_cache_control $cache_bypass {
15+ no-cache 1;
16+ }
17+ proxy_cache_bypass $cache_bypass ;
18+ # Don’t create a temp file if body > 100 MB
19+ proxy_max_temp_file_size 100m ;
2220
2321 # Only return Nginx in server header
2422 server_tokens off;
2523
2624 server {
27- server_name _ ;
25+ server_name s3.janelia.org ;
2826 listen 443 ssl default_server;
2927 listen [::]:443 ssl ;
3028 http2 on;
3129
3230 # SSL config
33- ssl_certificate /certs/cert.crt;
34- ssl_certificate_key /certs/cert.key;
31+ ssl_certificate /certs/wildcard.janelia.org/ cert.crt;
32+ ssl_certificate_key /certs/wildcard.janelia.org/ cert.key;
3533 include /etc/nginx/conf/ssl .conf;
3634
35+ location = / {
36+ include /etc/nginx/conf/proxy_cache .conf;
37+ include /etc/nginx/conf/proxy_pass .conf;
38+ }
39+
3740 location / {
41+ include /etc/nginx/conf/proxy_cache .conf;
3842 include /etc/nginx/conf/proxy_pass .conf;
3943 }
4044 }
4145
4246 upstream x2s3 {
4347 zone upstreams 64K ;
4448 server x2s3:8000 ;
45- keepalive 2 ;
49+ keepalive 3 ;
4650 }
4751}
0 commit comments