Advertisement
Guest User

nginx.conf

a guest
May 7th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1.  
  2. #user nobody;
  3. #Defines which Linux system user will own and run the Nginx server
  4.  
  5. worker_processes 1;
  6. #Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
  7.  
  8. #error_log logs/error.log; #error_log logs/error.log notice;
  9. #Specifies the file where server logs.
  10.  
  11. #pid logs/nginx.pid;
  12. #nginx will write its master process ID(PID).
  13.  
  14. events {
  15. worker_connections 1024;
  16. # worker_processes and worker_connections allows you to calculate maxclients value:
  17. # max_clients = worker_processes * worker_connections
  18. }
  19.  
  20.  
  21. http {
  22. include mime.types;
  23. # anything written in /opt/nginx/conf/mime.types is interpreted as if written inside the http { } block
  24.  
  25. default_type application/octet-stream;
  26. #
  27.  
  28. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  29. # '$status $body_bytes_sent "$http_referer" '
  30. # '"$http_user_agent" "$http_x_forwarded_for"';
  31.  
  32. #access_log logs/access.log main;
  33.  
  34. sendfile on;
  35. # If serving locally stored static files, sendfile is essential to speed up the server,
  36. # But if using as reverse proxy one can deactivate it
  37.  
  38. #tcp_nopush on;
  39. # works opposite to tcp_nodelay. Instead of optimizing delays, it optimizes the amount of data sent at once.
  40.  
  41. #keepalive_timeout 0;
  42. keepalive_timeout 65;
  43. # timeout during which a keep-alive client connection will stay open.
  44.  
  45. #gzip on;
  46. # tells the server to use on-the-fly gzip compression.
  47.  
  48.  
  49.  
  50. # another virtual host using mix of IP-, name-, and port-based configuration
  51. #
  52. #server {
  53. # listen 8000;
  54. # listen somename:8080;
  55. # server_name somename alias another.alias;
  56.  
  57. # location / {
  58. # root html;
  59. # index index.html index.htm;
  60. # }
  61. #}
  62.  
  63.  
  64. # HTTPS server
  65. #
  66. #server {
  67. # listen 443 ssl;
  68. # server_name localhost;
  69.  
  70. # ssl_certificate cert.pem;
  71. # ssl_certificate_key cert.key;
  72.  
  73. # ssl_session_cache shared:SSL:1m;
  74. # ssl_session_timeout 5m;
  75.  
  76. # ssl_ciphers HIGH:!aNULL:!MD5;
  77. # ssl_prefer_server_ciphers on;
  78.  
  79. # location / {
  80. # root html;
  81. # index index.html index.htm;
  82. # }
  83. #}
  84.  
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement