36 lines
913 B
Plaintext
36 lines
913 B
Plaintext
server {
|
|
listen 80;
|
|
server_name bartool.ovh;
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
# Obsługa aplikacji pod ścieżką /vue-app
|
|
location /vue-app {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Przekierowanie dla Vue Router (SPA mode)
|
|
try_files $uri /index.html;
|
|
|
|
# Przepuszczenie nagłówków
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
# Optymalizacja statycznych plików
|
|
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ {
|
|
expires 6M;
|
|
access_log off;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
# Kompresja
|
|
gzip on;
|
|
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/json;
|
|
gzip_min_length 1000;
|
|
|
|
# Logi
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
}
|