Add vhost.conf

This commit is contained in:
2026-02-25 14:08:10 +00:00
parent 94f0573827
commit e51b6e7378

18
vhost.conf Normal file
View File

@@ -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";
}
}