Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # For more information on configuration, see:
- # * Official English Documentation: http://nginx.org/en/docs/
- # * Official Russian Documentation: http://nginx.org/ru/docs/
- user nginx;
- worker_processes 8;
- worker_rlimit_nofile 100000;
- #error_log /var/log/nginx/error.log;
- error_log /var/log/nginx/error.log notice;
- #error_log /var/log/nginx/error.log info;
- pid /var/run/nginx.pid;
- events {
- worker_connections 10000; # 1024;
- use epoll;
- multi_accept on;
- }
- http {
- 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" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
- # to boost IO on HDD we can disable access logs
- access_log off;
- client_max_body_size 100m;
- client_body_buffer_size 50m;
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- #keepalive_timeout 0;
- keepalive_timeout 150;
- keepalive_requests 100000;
- reset_timedout_connection on;
- open_file_cache max=1000 inactive=20s;
- open_file_cache_valid 10s;
- open_file_cache_min_uses 2;
- open_file_cache_errors on;
- gzip on;
- gzip_vary on;
- gzip_proxied any;
- gzip_comp_level 6;
- gzip_buffers 16 8k;
- gzip_http_version 1.0;
- gzip_disable "MSIE [1-6].(?!.*SV1)";
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m;
- # Load config files from the /etc/nginx/conf.d directory
- # The default server is in conf.d/default.conf
- include /etc/nginx/conf.d/*.conf;
- # proxy cache
- # proxy_cache_path /var/cache/nginx/proxy_cache levels=1:2
- # keys_zone=czone:32m max_size=256m inactive=1440m;
- # proxy_temp_path /var/cache/nginx/proxy_temp;
- # proxy_cache_key "$scheme://$host$request_uri";
- # proxy_set_header Host $host;
- # proxy_set_header X-Real-IP $remote_addr;
- # proxy_set_header Remote-Addr $remote_addr;
- # proxy_set_header X-Forwarded-Host $host;
- # proxy_set_header X-Forwarded-Server $host;
- # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- # proxy_set_header Accept-Encoding "";
- # proxy_set_header X-UA-Detect $mobile;
- # proxy_hide_header X-Pingback;
- # proxy_hide_header Link;
- # proxy_hide_header ETag;
- # proxy_connect_timeout 5;
- # proxy_send_timeout 10;
- # proxy_read_timeout 120;
- # proxy_cache_use_stale timeout invalid_header http_500 http_502 http_503 http_504;
- # proxy_cache_lock on;
- # proxy_cache_lock_timeout 5s;
- # fastcgi cache
- #fastcgi_cache_path /var/cache/nginx/fastcgi_cache levels=1:2
- #keys_zone=fastcgizone:32m inactive=60m;
- #fastcgi_cache_key "$scheme$request_method$host$request_uri";
- #fastcgi_cache_use_stale error timeout invalid_header http_500;
- # fastcgi_buffers 256 16k;
- # fastcgi_buffer_size 128k;
- # fastcgi_connect_timeout 5s;
- # fastcgi_send_timeout 120s;
- # fastcgi_read_timeout 120s;
- # fastcgi_busy_buffers_size 256k;
- # fastcgi_temp_file_write_size 256k;
- # server_names_hash_bucket_size 100;
- # Retrieves real IP from Cloudflare cache
- set_real_ip_from 204.93.240.0/24;
- set_real_ip_from 204.93.177.0/24;
- set_real_ip_from 199.27.128.0/21;
- set_real_ip_from 173.245.48.0/20;
- set_real_ip_from 103.21.244.0/22;
- set_real_ip_from 103.22.200.0/22;
- set_real_ip_from 103.31.4.0/22;
- set_real_ip_from 141.101.64.0/18;
- set_real_ip_from 108.162.192.0/18;
- set_real_ip_from 190.93.240.0/20;
- set_real_ip_from 188.114.96.0/20;
- set_real_ip_from 197.234.240.0/22;
- set_real_ip_from 198.41.128.0/17;
- set_real_ip_from 162.158.0.0/15;
- #set_real_ip_from 2400:cb00::/32;
- #set_real_ip_from 2606:4700::/32;
- #set_real_ip_from 2803:f800::/32;
- #set_real_ip_from 2405:b500::/32;
- #set_real_ip_from 2405:8100::/32;
- real_ip_header CF-Connecting-IP;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement