25 lines
529 B
Nginx Configuration File
25 lines
529 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location ~* \.(jpg|jpeg|png|gif|ico|svg|webp)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location ~* \.(css|js)$ {
|
|
expires 1h;
|
|
add_header Cache-Control "public, must-revalidate";
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript image/svg+xml;
|
|
gzip_min_length 256;
|
|
}
|