nginx.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. worker_processes auto;
  2. pid /var/run/nginx.pid;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. include /etc/nginx/mime.types;
  8. default_type application/octet-stream;
  9. # Define the format of log messages.
  10. log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" '
  11. '$status $body_bytes_sent "$http_referer" '
  12. '"$http_user_agent" "$http_x_forwarded_for" '
  13. '"$host" sn="$server_name" '
  14. 'rt=$request_time '
  15. 'ua="$upstream_addr" us="$upstream_status" '
  16. 'ut="$upstream_response_time" ul="$upstream_response_length" '
  17. 'cs=$upstream_cache_status' ;
  18. access_log /var/log/nginx/access.log main_ext;
  19. error_log /var/log/nginx/error.log warn;
  20. sendfile on;
  21. keepalive_timeout 65;
  22. # Enable Compression
  23. gzip on;
  24. # Disable Display of NGINX Version
  25. server_tokens off;
  26. # Size Limits
  27. client_body_buffer_size 10K;
  28. client_header_buffer_size 1k;
  29. client_max_body_size 8m;
  30. large_client_header_buffers 2 1k;
  31. # # SSL / TLS Settings - Suggested for Security
  32. # ssl_protocols TLSv1.2 TLSv1.3;
  33. # ssl_session_timeout 15m;
  34. # ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
  35. # ssl_prefer_server_ciphers on;
  36. # ssl_session_tickets off;
  37. include /etc/nginx/conf.d/*.conf;
  38. }