Skip to content

Nginx maintenance page

Just some example code for an nginx maintenance page:

location = /503.html {
    root /var/www/maintenance;
}
location = /503logo.png {
    root /var/www/maintenance;
}
 
location / {
    if ($remote_addr != 1.2.3.4) {
      error_page 503 /503.html;
      return 503;
    }
 
    <your standard stuff>
}


    No Comments ( Add comment / trackback )