Hacker News new | ask | show | jobs
by indemnity83 45 days ago
Similar here, except I didn't want to actually shut down the servers, because then I can't patch them! My solution was to just turn off Nginx, which prevents anything from reaching PHP. Then I stuck a caddy server with a temporary config so we get actual 503 maintenance responses.

It seemed to be helpful for others too so I packaged it up, should work on most Nginx / Certbot servers. hopefully its useful: https://github.com/Indemnity83/popcorn

1 comments

If you're using Nginx why not just stop php-fpm? Then static parts still work and you can have whatever error response you want from Nginx.