nginx.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # For more information on configuration, see:
  2. # * Official English Documentation: http://nginx.org/en/docs/
  3. # * Official Russian Documentation: http://nginx.org/ru/docs/
  4. user nginx;
  5. worker_processes auto;
  6. error_log /var/log/nginx/error.log;
  7. pid /run/nginx.pid;
  8. # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
  9. include /usr/share/nginx/modules/*.conf;
  10. events {
  11. worker_connections 1024;
  12. }
  13. http {
  14. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. '$status $body_bytes_sent "$http_referer" '
  16. '"$http_user_agent" "$http_x_forwarded_for" '
  17. '$proxy_protocol_addr:$proxy_protocol_port';
  18. access_log /var/log/nginx/access.log main;
  19. sendfile on;
  20. tcp_nopush on;
  21. tcp_nodelay on;
  22. keepalive_timeout 65;
  23. types_hash_max_size 2048;
  24. include /etc/nginx/mime.types;
  25. default_type application/octet-stream;
  26. # Load modular configuration files from the /etc/nginx/conf.d directory.
  27. # See http://nginx.org/en/docs/ngx_core_module.html#include
  28. # for more information.
  29. include /etc/nginx/conf.d/*.conf;
  30. server {
  31. #listen 80 default_server;
  32. #listen [::]:80 default_server;
  33. listen [::]:80 default ipv6only=off;
  34. return 301 https://$http_host$request_uri;
  35. }
  36. server {
  37. listen unix:/dev/shm/default.sock proxy_protocol;
  38. listen unix:/dev/shm/h2c.sock http2 proxy_protocol;
  39. server_name _;
  40. root /usr/share/nginx/html;
  41. set_real_ip_from 127.0.0.1;
  42. # Load configuration files for the default server block.
  43. include /etc/nginx/default.d/*.conf;
  44. location / {
  45. }
  46. error_page 404 /404.html;
  47. location = /40x.html {
  48. }
  49. error_page 500 502 503 504 /50x.html;
  50. location = /50x.html {
  51. }
  52. }
  53. # Settings for a TLS enabled server.
  54. #
  55. # server {
  56. # listen 443 ssl http2 default_server;
  57. # listen [::]:443 ssl http2 default_server;
  58. # server_name _;
  59. # root /usr/share/nginx/html;
  60. #
  61. # ssl_certificate "/etc/pki/nginx/server.crt";
  62. # ssl_certificate_key "/etc/pki/nginx/private/server.key";
  63. # ssl_session_cache shared:SSL:1m;
  64. # ssl_session_timeout 10m;
  65. # ssl_ciphers PROFILE=SYSTEM;
  66. # ssl_prefer_server_ciphers on;
  67. #
  68. # # Load configuration files for the default server block.
  69. # include /etc/nginx/default.d/*.conf;
  70. #
  71. # location / {
  72. # }
  73. #
  74. # error_page 404 /404.html;
  75. # location = /40x.html {
  76. # }
  77. #
  78. # error_page 500 502 503 504 /50x.html;
  79. # location = /50x.html {
  80. # }
  81. # }
  82. }