Advertisement
Guest User

Nginx nginx.conf

a guest
Jan 18th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. worker_rlimit_nofile 100000;
  4. pid /run/nginx.pid;
  5.  
  6. events {
  7. debug_connection 0.0.0.0/0;
  8. worker_connections 4096;
  9. multi_accept on;
  10. }
  11.  
  12. http {
  13. ##
  14. # EasyEngine Settings
  15. ##
  16.  
  17. sendfile on;
  18. tcp_nopush on;
  19. tcp_nodelay on;
  20. keepalive_timeout 30;
  21. types_hash_max_size 2048;
  22.  
  23. server_tokens off;
  24. reset_timedout_connection on;
  25. add_header X-Powered-By "EasyEngine 3.7.4";
  26. add_header rt-Fastcgi-Cache $upstream_cache_status;
  27.  
  28. # Limit Request
  29. limit_req_status 403;
  30. limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
  31.  
  32. # Proxy Settings
  33. # set_real_ip_from proxy-server-ip;
  34. # real_ip_header X-Forwarded-For;
  35.  
  36. fastcgi_read_timeout 300;
  37. client_max_body_size 100m;
  38.  
  39. ##
  40. # SSL Settings
  41. ##
  42.  
  43. ssl_session_cache shared:SSL:20m;
  44. ssl_session_timeout 10m;
  45. ssl_prefer_server_ciphers on;
  46. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA2$
  47. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  48.  
  49. ##
  50. # Basic Settings
  51. ##
  52. # server_names_hash_bucket_size 64;
  53. # server_name_in_redirect off;
  54.  
  55. include /etc/nginx/mime.types;
  56. default_type application/octet-stream;
  57.  
  58. ##
  59. # Logging Settings
  60. ##
  61.  
  62. access_log /var/log/nginx/access.log;
  63. error_log /var/log/nginx/error.log;
  64.  
  65. # Log format Settings
  66. log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
  67. '$http_host "$request" $status $body_bytes_sent '
  68. '"$http_referer" "$http_user_agent"';
  69.  
  70. ##
  71. # Gzip Settings
  72. ##
  73.  
  74. gzip on;
  75. gzip_disable "msie6";
  76.  
  77. gzip_vary on;
  78. gzip_proxied any;
  79. gzip_comp_level 6;
  80. gzip_buffers 16 8k;
  81. gzip_http_version 1.1;
  82. gzip_types
  83. application/atom+xml
  84. application/javascript
  85. application/json
  86. application/rss+xml
  87. application/vnd.ms-fontobject
  88. application/x-font-ttf
  89. application/x-web-app-manifest+json
  90. application/xhtml+xml
  91. application/xml
  92. font/opentype
  93. image/svg+xml
  94. image/x-icon
  95. text/css
  96. text/plain
  97. text/x-component
  98. text/xml
  99. text/javascript;
  100.  
  101. ##
  102. # Virtual Host Configs
  103. ##
  104.  
  105. include /etc/nginx/conf.d/*.conf;
  106. include /etc/nginx/sites-enabled/*;
  107. }
  108.  
  109.  
  110. #mail {
  111. # # See sample authentication script at:
  112. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  113. #
  114. # # auth_http localhost/auth.php;
  115. # # pop3_capabilities "TOP" "USER";
  116. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  117. #
  118. # server {
  119. # listen localhost:110;
  120. # protocol pop3;
  121. # proxy on;
  122. # }
  123. #
  124. # server {
  125. # listen localhost:143;
  126. # protocol imap;
  127. # proxy on;
  128. # }
  129. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement