Configure nginx to try .html extension for clean URLs like /music/shadow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
451 B
Nginx Configuration File
24 lines
451 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
|
|
# Jekyll clean URLs - try .html extension
|
|
location / {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
# Handle 404 errors
|
|
error_page 404 /404.html;
|
|
location = /404.html {
|
|
internal;
|
|
}
|
|
|
|
# Handle server errors
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
internal;
|
|
}
|
|
}
|