snow-swallow / blog

Seek more? Go to Issues :-)
1 stars 0 forks source link

Nginx 几个静态资源加速的配置 #88

Open snow-swallow opened 4 years ago

snow-swallow commented 4 years ago
### Add more work Core ###
worker_processes  4;

### Enable gzip ###
gzip on;
gzip_vary on;
gzip_min_length 1000;
gzip_comp_level 4;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;

### fastcgi ###
fastcgi_connect_timeout 3600;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;

### proxy buffer ###
proxy_read_timeout 3600;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_buffer_size 10240k;
proxy_buffers 4 10240k; 
proxy_busy_buffers_size 10240k;
proxy_temp_file_write_size 10240k; ### control the file upload max size