Matchstrike_maintenance is a project mainly written in PHP, it's free.
A simple Nginx + PHP based maintenance page that sets appropriate headers.
This repo contains a simple Nginx/PHP based maintenance page template that aims to do the following:
With Nginx, item #3 is particularly difficult because the add_header configuration directive doesn't work when returning a 503 response code. To work around this limitation, this maintenance page defers to PHP for returning the appropriate headers.
Item #4 can be achieved by making the maintenance page the server's default server container. Then, activating it for a certain domain is as simple as disabling the server container that overrides the maintenance page and telling Nginx to reload its configuration.
This repository is maintained by the developers at Match Strike. You are free to use this as a template for creating your own maintenance page, but please refrain from using our graphics and logo.