18 lines
420 B
Nginx Configuration File
18 lines
420 B
Nginx Configuration File
server {
|
|
listen 8080;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# VitePress cleanUrls: each page is a *.html file on disk
|
|
location / {
|
|
try_files $uri $uri.html $uri/ $uri/index.html =404;
|
|
}
|
|
|
|
location ~* \.(html|css|js|json|svg|woff2?|png|jpg|jpeg|gif|ico|webp)$ {
|
|
add_header Cache-Control "public, max-age=3600";
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
}
|