You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
2.4 KiB

  1. user www-data;
  2. worker_processes {{ nginx_worker_process | default("auto")}};
  3. worker_shutdown_timeout 30;
  4. pid /run/nginx.pid;
  5. include /etc/nginx/modules-enabled/*.conf;
  6. events {
  7. worker_connections {{ nginx_worker_connections | default('768')}};
  8. multi_accept on;
  9. }
  10. http {
  11. ##
  12. # Basic Settings
  13. ##
  14. sendfile on;
  15. tcp_nopush on;
  16. tcp_nodelay on;
  17. keepalive_disable msie6;
  18. keepalive_requests 100;
  19. keepalive_timeout 65;
  20. types_hash_max_size 2048;
  21. server_tokens off;
  22. #server_names_hash_max_size 2048;
  23. proxy_headers_hash_max_size 2048;
  24. proxy_max_temp_file_size {{ nginx_proxy_map_temp_file_size | default("2048m")}};
  25. proxy_headers_hash_bucket_size 256;
  26. # server_names_hash_bucket_size 64;
  27. # server_name_in_redirect off;
  28. include /etc/nginx/conf/mime.types;
  29. default_type application/octet-stream;
  30. ##
  31. # Logging Settings
  32. ##
  33. access_log /var/log/nginx/access.log;
  34. error_log /var/log/nginx/error.log;
  35. #more_set_headers 'Server: secret';
  36. aio threads;
  37. aio_write on;
  38. limit_conn_zone $binary_remote_addr zone=limit_per_ip:10m;
  39. limit_conn limit_per_ip 128;
  40. limit_req_zone $binary_remote_addr zone=allips:10m rate=150r/s;
  41. limit_req zone=allips burst=150 nodelay;
  42. gzip on;
  43. gzip_comp_level 6;
  44. gzip_min_length 512;
  45. gzip_buffers 4 8k;
  46. gzip_proxied any;
  47. gzip_vary on;
  48. gzip_disable "msie6";
  49. gzip_types
  50. text/css
  51. text/javascript
  52. text/xml
  53. text/plain
  54. text/x-component
  55. application/javascript
  56. application/x-javascript
  57. application/json
  58. application/xml
  59. application/rss+xml
  60. application/vnd.ms-fontobject
  61. font/truetype
  62. font/opentype
  63. image/svg+xml;
  64. # brotli on;
  65. # brotli_static on;
  66. # brotli_buffers 16 8k;
  67. # brotli_comp_level 6;
  68. # brotli_types
  69. # text/css
  70. # text/javascript
  71. # text/xml
  72. # text/plain
  73. # text/x-component
  74. # application/javascript
  75. # application/x-javascript
  76. # application/json
  77. # application/xml
  78. # application/rss+xml
  79. # application/vnd.ms-fontobject
  80. # font/truetype
  81. # font/opentype
  82. # image/svg+xml;
  83. ##
  84. # Virtual Host Configs
  85. ##
  86. #include /etc/nginx/conf.d/*.conf;
  87. include /etc/nginx/sites-enabled/*;
  88. }
  89. #mail {
  90. # # See sample authentication script at:
  91. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  92. #
  93. # # auth_http localhost/auth.php;
  94. # # pop3_capabilities "TOP" "USER";
  95. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  96. #
  97. # server {
  98. # listen localhost:110;
  99. # protocol pop3;
  100. # proxy on;
  101. # }
  102. #
  103. # server {
  104. # listen localhost:143;
  105. # protocol imap;
  106. # proxy on;
  107. # }
  108. #}