From e51b6e737877971033d7e0d994d7d96e6c07476a Mon Sep 17 00:00:00 2001 From: Ihor_Zhekov Date: Wed, 25 Feb 2026 14:08:10 +0000 Subject: [PATCH] Add vhost.conf --- vhost.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vhost.conf diff --git a/vhost.conf b/vhost.conf new file mode 100644 index 0000000..5c01f59 --- /dev/null +++ b/vhost.conf @@ -0,0 +1,18 @@ +server { + listen 80; + server_name localhost; + + root /usr/share/nginx/html; + index index.html; + + location / { + # Пытаемся найти файл, потом папку, если нет — отдаем 404 + try_files $uri $uri/ $uri.html =404; + } + + # Настройка кэширования для картинок и видео + location ~* \.(jpg|jpeg|png|gif|ico|css|js|mp4|webm)$ { + expires 30d; + add_header Cache-Control "public, no-transform"; + } +} \ No newline at end of file