lifesub-web/container/nginx.conf
2025-02-15 13:15:05 +09:00

29 lines
681 B
Nginx Configuration File

server {
listen 18080;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
# Cache static files
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 1y;
add_header Cache-Control "public, no-transform";
}
}
# Health check endpoint
location /health {
access_log off;
return 200 'healthy\n';
add_header Content-Type text/plain;
}
# Error pages
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}