nginx.conf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Define the user that will own and run the Nginx server
  2. user nginx;
  3. # Define the number of worker processes; recommended value is the number of
  4. # cores that are being used by your server
  5. worker_processes 1;
  6. # Define the location on the file system of the error log, plus the minimum
  7. # severity to log messages for
  8. error_log /var/log/nginx/error.log warn;
  9. # Define the file that will store the process ID of the main NGINX process
  10. pid /var/run/nginx.pid;
  11. # events block defines the parameters that affect connection processing.
  12. events {
  13. # Define the maximum number of simultaneous connections that can be opened by a worker proce$
  14. worker_connections 1024;
  15. }
  16. # http block defines the parameters for how NGINX should handle HTTP web traffic
  17. http {
  18. # Include the file defining the list of file types that are supported by NGINX
  19. include /etc/nginx/mime.types;
  20. # Define the default file type that is returned to the user
  21. default_type text/html;
  22. # Define the format of log messages.
  23. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  24. '$status $body_bytes_sent "$http_referer" '
  25. '"$http_user_agent" "$http_x_forwarded_for"';
  26. # Define the location of the log of access attempts to NGINX
  27. access_log /var/log/nginx/access.log main;
  28. # Define the parameters to optimize the delivery of static content
  29. sendfile on;
  30. tcp_nopush on;
  31. tcp_nodelay on;
  32. # Define the timeout value for keep-alive connections with the client
  33. keepalive_timeout 65;
  34. # Define the usage of the gzip compression algorithm to reduce the amount of data to transmit
  35. #gzip on;
  36. # Include additional parameters for virtual host(s)/server(s)
  37. include /etc/nginx/conf.d/*.conf;
  38. }