Image autobuild (#1)
All checks were successful
release-tag / release-image (push) Successful in 44s
All checks were successful
release-tag / release-image (push) Successful in 44s
Reviewed-on: #1 Co-authored-by: Alexander Lazarenko <kerblif@unprism.ru> Co-committed-by: Alexander Lazarenko <kerblif@unprism.ru>
This commit is contained in:
34
nginx.conf
Normal file
34
nginx.conf
Normal file
@ -0,0 +1,34 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost; # Замените на ваш домен, если необходимо
|
||||
|
||||
# Корневая директория для статических файлов
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
# Важно для Single Page Applications (SPA) вроде Vue
|
||||
# Пытается отдать файл по $uri, затем директорию $uri/,
|
||||
# иначе отдает /index.html (чтобы Vue Router обработал маршрут)
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Опционально: gzip сжатие для улучшения производительности
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
|
||||
# Опционально: Заголовки кэширования для статических ассетов
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|css|js|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Опционально: Обработка ошибок (рекомендуется)
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user