Guest User

Untitled

a guest
Oct 25th, 2020
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. # /etc/nginx/nginx.conf
  2.  
  3. user nginx;
  4. worker_processes 4;
  5. worker_cpu_affinity 0001 0010 0100 1000;
  6. worker_rlimit_nofile 131072;
  7. timer_resolution 100ms;
  8. worker_priority -10;
  9. # Enables the use of JIT for regular expressions to speed-up their processing.
  10. pcre_jit on;
  11.  
  12. # Configures default error logger.
  13. error_log /tmp/error.log info;
  14. #error_log syslog:server=unix:/dev/log,nohostname,tag=nginx_error warn;
  15.  
  16. # Includes files with directives to load dynamic modules.
  17. include /etc/nginx/modules/*.conf;
  18.  
  19.  
  20. events {
  21. # The maximum number of simultaneous connections that can be opened by
  22. # a worker process.
  23. worker_connections 32768;
  24. use epoll;
  25. accept_mutex on;
  26. multi_accept on;
  27. }
  28.  
  29. http {
  30. # enable WS via reverse proxy
  31. map $http_upgrade $connection_upgrade {
  32. default upgrade;
  33. '' close;
  34. }
  35. # client_body_temp_path /run/nginx/client_body;
  36. # proxy_temp_path /run/nginx/proxy;
  37. #proxy_cache_path /run/nginx/proxy_cache ;
  38. # fastcgi_temp_path /run/nginx/fastcgi;
  39. # uwsgi_temp_path /run/nginx/uwsgi;
  40. # scgi_temp_path /run/nginx/scgi;
  41. # Includes mapping of file name extensions to MIME types of responses
  42. # and defines the default type.
  43. include /etc/nginx/mime.types;
  44. default_type application/octet-stream;
  45.  
  46. # Name servers used to resolve names of upstream servers into addresses.
  47. # It's also needed when using tcpsocket and udpsocket in Lua modules.
  48. resolver 10.201.50.254;
  49.  
  50. # Don't tell nginx version to clients.
  51. server_tokens off;
  52.  
  53. # Specifies the maximum accepted body size of a client request, as
  54. # indicated by the request header Content-Length. If the stated content
  55. # length is greater than this size, then the client receives the HTTP
  56. # error code 413. Set to 0 to disable.
  57. client_max_body_size 100m;
  58.  
  59. # Timeout for keep-alive connections. Server will close connections after
  60. # this time.
  61. keepalive_timeout 15;
  62. keepalive_requests 10000;
  63. # Sendfile copies data between one FD and other from within the kernel,
  64. # which is more efficient than read() + write().
  65. sendfile on;
  66.  
  67. # Don't buffer data-sends (disable Nagle algorithm).
  68. # Good for sending frequent small bursts of data in real time.
  69. tcp_nodelay on;
  70.  
  71. # Causes nginx to attempt to send its HTTP response head in one packet,
  72. # instead of using partial frames.
  73. tcp_nopush on;
  74.  
  75. # Enable gzipping of responses.
  76. gzip on;
  77.  
  78. # Set the Vary HTTP header as defined in the RFC 2616.
  79. gzip_vary on;
  80.  
  81. # Enable checking the existence of precompressed files.
  82. gzip_static on;
  83.  
  84.  
  85. # Specifies the main log format.
  86. # log_format main '$http_x_forwarded_for - $remote_user [$time_local] "$request" '
  87. # '$status $body_bytes_sent "$http_referer" '
  88. # '"$http_user_agent" "$http_x_forwarded_for"';
  89.  
  90. log_format main '[front] [host:$http_host] $remote_addr - $remote_user [$time_iso8601] "$request" '
  91. '$status $body_bytes_sent "$http_referer" '
  92. '"$http_user_agent" "$http_x_forwarded_for" $request_id ';
  93.  
  94. log_format upstream '$remote_addr - $remote_user [$time_iso8601] "$request" '
  95. '$status $body_bytes_sent "$http_referer" '
  96. '"$http_user_agent" "$http_x_forwarded_for" $request_id '
  97. 'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
  98.  
  99. # Sets the path, format, and configuration for a buffered log write.
  100. # access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_access main;
  101. access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_access main;
  102. # Includes virtual hosts configs.
  103. # proxy_headers_hash_max_size 1024;
  104. # proxy_headers_hash_bucket_size 256;
  105. include /etc/nginx/conf.d/*.conf;
  106. }
Add Comment
Please, Sign In to add comment