19 lines
465 B
Nginx Configuration File
19 lines
465 B
Nginx Configuration File
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name _;
|
||
|
|
root /usr/share/nginx/html;
|
||
|
|
index index.html;
|
||
|
|
|
||
|
|
# Static Next.js export: serve the file, its .html twin, or fall back to the
|
||
|
|
# SPA shell (the app uses client-side hash routing).
|
||
|
|
location / {
|
||
|
|
try_files $uri $uri.html $uri/ /index.html;
|
||
|
|
}
|
||
|
|
|
||
|
|
# Long-cache immutable build assets.
|
||
|
|
location /_next/static/ {
|
||
|
|
expires 1y;
|
||
|
|
add_header Cache-Control "public, immutable";
|
||
|
|
}
|
||
|
|
}
|