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.

nginx.conf 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. user nginx;
  2. # Set number of worker processes automatically based on number of CPU cores.
  3. worker_processes auto;
  4. # Enables the use of JIT for regular expressions to speed-up their processing.
  5. pcre_jit on;
  6. # Configures default error logger.
  7. # error_log /data/log/error.log warn;
  8. events {
  9. # The maximum number of simultaneous connections that can be opened by
  10. # a worker process.
  11. worker_connections 1024;
  12. }
  13. http {
  14. # Includes mapping of file name extensions to MIME types of responses
  15. # and defines the default type.
  16. include /etc/nginx/mime.types;
  17. default_type application/octet-stream;
  18. # Name servers used to resolve names of upstream servers into addresses.
  19. # It's also needed when using tcpsocket and udpsocket in Lua modules.
  20. #resolver 208.67.222.222 208.67.220.220;
  21. # Don't tell nginx version to clients.
  22. server_tokens off;
  23. # Specifies the maximum accepted body size of a client request, as
  24. # indicated by the request header Content-Length. If the stated content
  25. # length is greater than this size, then the client receives the HTTP
  26. # error code 413. Set to 0 to disable.
  27. client_max_body_size 1m;
  28. # Timeout for keep-alive connections. Server will close connections after
  29. # this time.
  30. keepalive_timeout 65;
  31. # Sendfile copies data between one FD and other from within the kernel,
  32. # which is more efficient than read() + write().
  33. sendfile on;
  34. # Don't buffer data-sends (disable Nagle algorithm).
  35. # Good for sending frequent small bursts of data in real time.
  36. tcp_nodelay on;
  37. # Causes nginx to attempt to send its HTTP response head in one packet,
  38. # instead of using partial frames.
  39. #tcp_nopush on;
  40. # Path of the file with Diffie-Hellman parameters for EDH ciphers.
  41. #ssl_dhparam /etc/ssl/nginx/dh2048.pem;
  42. # Specifies that our cipher suits should be preferred over client ciphers.
  43. ssl_prefer_server_ciphers on;
  44. # Enables a shared SSL cache with size that can hold around 8000 sessions.
  45. ssl_session_cache shared:SSL:2m;
  46. # Enable gzipping of responses.
  47. #gzip on;
  48. # Set the Vary HTTP header as defined in the RFC 2616.
  49. gzip_vary on;
  50. # Enable checking the existence of precompressed files.
  51. #gzip_static on;
  52. # Specifies the main log format.
  53. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  54. '$status $body_bytes_sent "$http_referer" '
  55. '"$http_user_agent" "$http_x_forwarded_for"';
  56. # Sets the path, format, and configuration for a buffered log write.
  57. # access_log /var/log/nginx/access.log main;
  58. # Includes virtual hosts configs.
  59. include /etc/nginx/conf.d/*.conf;
  60. }