user nginx; worker_processes auto; worker_rlimit_nofile 100000; pid /var/run/nginx.pid; events { worker_connections 2000; multi_accept on; use epoll; } http { index index.html index.php; include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" '; log_format error403 '$remote_addr - [$time_local] "$request"'; keepalive_timeout 5; autoindex off; server_tokens off; port_in_redirect off; sendfile on; tcp_nopush on; tcp_nodelay on; client_max_body_size 64m; ## Flood protection example limit_req_zone $binary_remote_addr zone=goeasy:25m rate=1r/s; ## Cache open FD open_file_cache max=10000 inactive=3600s; open_file_cache_valid 7200s; open_file_cache_min_uses 2; ## Gzipping is an easy way to reduce page weight gzip on; gzip_vary on; gzip_proxied any; gzip_types application/javascript application/x-javascript text/javascript text/css; gzip_buffers 16 8k; gzip_comp_level 6; ## SSL global settings #ssl_session_cache shared:SSL:25m; #ssl_session_timeout 15m; #ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #ssl_ciphers "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5"; #ssl_prefer_server_ciphers on; #ssl_dhparam /etc/ssl/certs/dhparams.pem; #ssl_stapling on; #resolver 8.8.8.8 8.8.4.4 valid=3600s; #resolver_timeout 5s; ## Use when Varnish in front #set_real_ip_from 127.0.0.1; #real_ip_header X-Forwarded-For; ## Multi shop code configuration #include /etc/nginx/conf.d/multishop.conf; ## Map status to exclude from access log map $status $writelog { 404 0; 410 0; 444 0; default 1; } ## Main domain configuration include /etc/nginx/sites-enabled/*.conf; }