Guest User

nginx

a guest
Aug 24th, 2025
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. # run nginx in foreground
  2. daemon off;
  3. pid /run/nginx/nginx.pid;
  4. user npm;
  5.  
  6. # Set number of worker processes automatically based on number of CPU cores.
  7. worker_processes auto;
  8.  
  9. # Enables the use of JIT for regular expressions to speed-up their processing.
  10. pcre_jit on;
  11.  
  12. error_log /data/logs/fallback_error.log warn;
  13.  
  14. # Includes files with directives to load dynamic modules.
  15. include /etc/nginx/modules/*.conf;
  16.  
  17. # Custom
  18. include /data/nginx/custom/root_top[.]conf;
  19.  
  20. events {
  21. include /data/nginx/custom/events[.]conf;
  22. }
  23.  
  24. http {
  25. include /etc/nginx/mime.types;
  26. default_type application/octet-stream;
  27. sendfile on;
  28. server_tokens off;
  29. tcp_nopush on;
  30. tcp_nodelay on;
  31. client_body_temp_path /tmp/nginx/body 1 2;
  32. keepalive_timeout 90s;
  33. proxy_connect_timeout 90s;
  34. proxy_send_timeout 90s;
  35. proxy_read_timeout 90s;
  36. ssl_prefer_server_ciphers on;
  37. gzip on;
  38. proxy_ignore_client_abort off;
  39. client_max_body_size 2000m;
  40. server_names_hash_bucket_size 1024;
  41. proxy_http_version 1.1;
  42. proxy_set_header X-Forwarded-Scheme $scheme;
  43. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44. proxy_set_header Accept-Encoding "";
  45. proxy_cache off;
  46. proxy_cache_path /var/lib/nginx/cache/public levels=1:2 keys_zone=public-cache:30m max_size=192m;
  47. proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
  48.  
  49. # Log format and fallback log file
  50. include /etc/nginx/conf.d/include/log.conf;
  51.  
  52. # Dynamically generated resolvers file
  53. include /etc/nginx/conf.d/include/resolvers.conf;
  54.  
  55. # Default upstream scheme
  56. map $host $forward_scheme {
  57. default http;
  58. }
  59.  
  60. # Real IP Determination
  61.  
  62. # Local subnets:
  63. set_real_ip_from ******;
  64. set_real_ip_from ******; # Includes Docker subnet
  65. set_real_ip_from *******;
  66. # NPM generated CDN ip ranges:
  67. include conf.d/include/ip_ranges.conf;
  68. # always put the following 2 lines after ip subnets:
  69. real_ip_header X-Real-IP;
  70. real_ip_recursive on;
  71.  
  72. # Custom
  73. include /data/nginx/custom/http_top[.]conf;
  74.  
  75. # Files generated by NPM
  76. include /etc/nginx/conf.d/*.conf;
  77. include /data/nginx/default_host/*.conf;
  78. include /data/nginx/proxy_host/*.conf;
  79. include /data/nginx/redirection_host/*.conf;
  80. include /data/nginx/dead_host/*.conf;
  81. include /data/nginx/temp/*.conf;
  82.  
  83. # Custom
  84. include /data/nginx/custom/http[.]conf;
  85. }
  86.  
  87. stream {
  88. # Files generated by NPM
  89. include /data/nginx/stream/*.conf;
  90.  
  91. # Custom
  92. include /data/nginx/custom/stream[.]conf;
  93. }
  94.  
  95. # Custom
  96. include /data/nginx/custom/root[.]conf;
  97.  
Advertisement
Add Comment
Please, Sign In to add comment