server { listen 80 default_server; listen [::]:80 default_server; listen 443 default_server ssl; listen [::]:443 default_server ssl; client_max_body_size 1024M; root /app/public; index index.html index.htm; ssl_certificate /certs/example.crt; ssl_certificate_key /certs/example.key; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_ciphers HIGH:!aNULL:!MD5; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one location ~ /\.ht { deny all; } # Health check endpoint location /health { access_log off; add_header 'Content-Type' 'application/json'; return 200 '{"status":"Healthy"}'; } }