micro/deploy/nginx.conf
Neeldhara Misra c107b1aed9
Some checks are pending
Deploy to Netlify / deploy (push) Waiting to run
Serve pretty blog post URLs in nginx
2026-06-14 01:08:16 +02:00

24 lines
557 B
Nginx Configuration File

server {
listen 80 default_server;
server_name micro.neeldhara.blog micro.neeldhara.email _;
root /usr/share/nginx/html;
index index.html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
location = /nginx-health {
access_log off;
return 204;
}
location ~* \.(?:css|js|mjs|png|jpg|jpeg|gif|svg|webp|ico|woff2?)$ {
try_files $uri =404;
expires 1y;
add_header Cache-Control "public, immutable";
}
location / {
try_files $uri $uri/index.html /blog$uri/index.html /404.html;
}
}