Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. #user nobody;
  2. #Defines which Linux system user will own and run the Nginx server
  3.  
  4. worker_processes 1;
  5. #Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
  6.  
  7. #error_log logs/error.log; #error_log logs/error.log notice;
  8. #Specifies the file where server logs.
  9.  
  10. #pid logs/nginx.pid;
  11. #nginx will write its master process ID(PID).
  12.  
  13. events {
  14. worker_connections 1024;
  15. # worker_processes and worker_connections allows you to calculate maxclients value:
  16. # max_clients = worker_processes * worker_connections
  17. }
  18.  
  19.  
  20. http {
  21. include mime.types;
  22. # anything written in /opt/nginx/conf/mime.types is interpreted as if written inside the http { } block
  23.  
  24. default_type application/octet-stream;
  25. #
  26.  
  27. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  28. # '$status $body_bytes_sent "$http_referer" '
  29. # '"$http_user_agent" "$http_x_forwarded_for"';
  30.  
  31. #access_log logs/access.log main;
  32.  
  33. sendfile on;
  34. # If serving locally stored static files, sendfile is essential to speed up the server,
  35. # But if using as reverse proxy one can deactivate it
  36.  
  37. #tcp_nopush on;
  38. # works opposite to tcp_nodelay. Instead of optimizing delays, it optimizes the amount of data sent at once.
  39.  
  40. #keepalive_timeout 0;
  41. keepalive_timeout 65;
  42. # timeout during which a keep-alive client connection will stay open.
  43.  
  44. #gzip on;
  45. # tells the server to use on-the-fly gzip compression.
  46.  
  47. server {
  48. # You would want to make a separate file with its own server block for each virtual domain
  49. # on your server and then include them.
  50. listen 80;
  51. #tells Nginx the hostname and the TCP port where it should listen for HTTP connections.
  52. # listen 80; is equivalent to listen *:80;
  53.  
  54. server_name localhost;
  55. # lets you doname-based virtual hosting
  56.  
  57. #charset koi8-r;
  58.  
  59. #access_log logs/host.access.log main;
  60.  
  61. location / {
  62. #The location setting lets you configure how nginx responds to requests for resources within the server.
  63. root html;
  64. index index.html index.htm;
  65. }
  66.  
  67. #error_page 404 /404.html;
  68.  
  69. # redirect server error pages to the static page /50x.html
  70. #
  71. error_page 500 502 503 504 /50x.html;
  72. location = /50x.html {
  73. root html;
  74. }
  75.  
  76. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  77. #
  78. #location ~ \.php$ {
  79. # proxy_pass http://127.0.0.1;
  80. #}
  81.  
  82. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  83. #
  84. #location ~ \.php$ {
  85. # root html;
  86. # fastcgi_pass 127.0.0.1:9000;
  87. # fastcgi_index index.php;
  88. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  89. # include fastcgi_params;
  90. #}
  91.  
  92. # deny access to .htaccess files, if Apache's document root
  93. # concurs with nginx's one
  94. #
  95. #location ~ /\.ht {
  96. # deny all;
  97. #}
  98.  
  99. }
  100.  
  101.  
  102. # another virtual host using mix of IP-, name-, and port-based configuration
  103. #
  104. #server {
  105. # listen 8000;
  106. # listen somename:8080;
  107. # server_name somename alias another.alias;
  108.  
  109. # location / {
  110. # root html;
  111. # index index.html index.htm;
  112. # }
  113. #}
  114.  
  115.  
  116. # HTTPS server
  117. #
  118. #server {
  119. # listen 443 ssl;
  120. # server_name localhost;
  121.  
  122. # ssl_certificate cert.pem;
  123. # ssl_certificate_key cert.key;
  124.  
  125. # ssl_session_cache shared:SSL:1m;
  126. # ssl_session_timeout 5m;
  127.  
  128. # ssl_ciphers HIGH:!aNULL:!MD5;
  129. # ssl_prefer_server_ciphers on;
  130.  
  131. # location / {
  132. # root html;
  133. # index index.html index.htm;
  134. # }
  135. #}
  136.  
  137. include /etc/ngnix/conf.d/*.conf;
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement