Guest User

Untitled

a guest
Jul 28th, 2017
141
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user nginx;
  2. worker_processes 1;
  3. worker_rlimit_nofile 260000;
  4.  
  5. error_log /var/log/nginx/error.log warn;
  6. pid /var/run/nginx.pid;
  7.  
  8. events {
  9. worker_connections 2048;
  10. accept_mutex off;
  11. accept_mutex_delay 200ms;
  12. use epoll;
  13. #multi_accept on;
  14. }
  15.  
  16. http {
  17. include /etc/nginx/mime.types;
  18. default_type application/octet-stream;
  19.  
  20. set_real_ip_from 127.0.0.1;
  21. real_ip_header X-Forwarded-For;
  22. log_format main '$remote_addr - $remote_user [$time_local] $status '
  23. '"$request" $body_bytes_sent "$http_referer" '
  24. '"$http_user_agent" "$http_x_forwarded_for"';
  25.  
  26. #Disable IFRAME
  27. add_header X-Frame-Options SAMEORIGIN;
  28.  
  29. #Prevent Cross-site scripting (XSS) attacks
  30. add_header X-XSS-Protection "1; mode=block";
  31.  
  32. #Prevent MIME-sniffing
  33. add_header X-Content-Type-Options nosniff;
  34.  
  35. access_log off;
  36. sendfile on;
  37. tcp_nopush on;
  38. tcp_nodelay off;
  39. types_hash_max_size 2048;
  40. server_tokens off;
  41. server_names_hash_bucket_size 128;
  42. client_max_body_size 0;
  43. client_body_buffer_size 256k;
  44. client_body_in_file_only off;
  45. client_body_timeout 60s;
  46. client_header_buffer_size 256k;
  47. client_header_timeout 20s;
  48. large_client_header_buffers 8 256k;
  49. keepalive_timeout 10;
  50. keepalive_disable msie6;
  51. reset_timedout_connection on;
  52. send_timeout 60s;
  53.  
  54. gzip on;
  55. gzip_static on;
  56. gzip_disable "msie6";
  57. gzip_vary on;
  58. gzip_proxied any;
  59. gzip_comp_level 6;
  60. gzip_buffers 16 8k;
  61. gzip_http_version 1.1;
  62. gzip_types text/plain text/css application/json text/javascript application/javascript text/xml application/xml application/xml+rss;
  63. include /etc/nginx/conf.d/*.conf;
  64.  
  65. set_real_ip_from 204.93.240.0/24;
  66. set_real_ip_from 204.93.177.0/24;
  67. set_real_ip_from 199.27.128.0/21;
  68. set_real_ip_from 173.245.48.0/20;
  69. set_real_ip_from 103.22.200.0/22;
  70. set_real_ip_from 141.101.64.0/18;
  71. set_real_ip_from 108.162.192.0/18;
  72. set_real_ip_from 127.0.0.1/32;
  73. real_ip_header CF-Connecting-IP;
  74.  
  75. }
RAW Paste Data