From 34aac6508188dc4b45443005eba9f78a412fe234 Mon Sep 17 00:00:00 2001 From: Yan Kasabutski Date: Thu, 10 Apr 2025 08:23:05 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?=20=20z2/nginx=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- z2/nginx/default.conf | 26 ++++++++++++++++++++++++++ z2/nginx/nginx.conf | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 z2/nginx/default.conf create mode 100644 z2/nginx/nginx.conf diff --git a/ z2/nginx/default.conf b/ z2/nginx/default.conf new file mode 100644 index 0000000..56bc1af --- /dev/null +++ b/ z2/nginx/default.conf @@ -0,0 +1,26 @@ +# default.conf +server { + listen 80; + + server_name localhost; + + # путь до веб-приложения + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + # для обработки ошибок + + + error_page 404 /404.html; + location = /404.html { + root /usr/share/nginx/html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} diff --git a/ z2/nginx/nginx.conf b/ z2/nginx/nginx.conf new file mode 100644 index 0000000..c4f9ae5 --- /dev/null +++ b/ z2/nginx/nginx.conf @@ -0,0 +1,23 @@ +# nginx.conf +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + # Логирование + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + + include /etc/nginx/conf.d/*.conf; +}