Better Nginx config.
This commit is contained in:
parent
e05e5a62a3
commit
6a5ca97b65
|
@ -1,16 +1,15 @@
|
|||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
worker_rlimit_nofile 100000;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections 4096;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
@ -26,10 +25,12 @@ http {
|
|||
POST $binary_remote_addr;
|
||||
}
|
||||
|
||||
limit_req_zone $binary_remote_addr zone=one_per_second:20m rate=1r/s;
|
||||
limit_req_zone $binary_remote_addr zone=one_per_minute:20m rate=1r/m;
|
||||
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain application/x-javascript application/javascript text/xml text/css application/xml application/json;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
|
@ -12,16 +12,6 @@ server {
|
|||
real_ip_recursive on;
|
||||
set_real_ip_from 0.0.0.0/0;
|
||||
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1m;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
gzip on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain application/x-javascript application/javascript text/xml text/css application/xml application/json;
|
||||
|
||||
location / {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue