Skip to content

Instantly share code, notes, and snippets.

@jmlagace
Last active October 31, 2016 11:43
Show Gist options
  • Select an option

  • Save jmlagace/387b3260adb6a97087b3 to your computer and use it in GitHub Desktop.

Select an option

Save jmlagace/387b3260adb6a97087b3 to your computer and use it in GitHub Desktop.
return 503;
error_page 503 @maintenance;
location @maintenance {
rewrite ^(.*)$ /index.html break;
proxy_pass http://roberttalbott-maintenance.s3-us-west-1.amazonaws.com;
proxy_set_header Host roberttalbott-maintenance.s3-us-west-1.amazonaws.com;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Offline for Maintenance</title>
</head>
<body>
<iframe src="//roberttalbott-maintenance.s3-us-west-1.amazonaws.com/maintenance.html">
<p>Application Error</p>
</iframe>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background:#362f2d none repeat scroll 0 0;
color:#FFFFFF;
font-family:Helvetica,Arial,Verdana,sans-serif;
font-size:12px;
margin:0;
padding:0;
text-align:center;
}
h1
{
margin:0px;
padding:0px;
margin-top:30%;
font-size: 25pt;
display:block;
}
h2
{
padding:0px;
margin-top: 5px;
font-size: 18pt;
}
</style>
</head>
<body>
<img class="slide-logo" src="home-logo.png" alt="Robert Talbott" width="550" height="130" style="margin-top: 35px; width: 550px; height: 130px;">
<h1>We're sorry, but our website is under maintenance.</h1>
<h2>Please enjoy a quick cup of espresso and then try refreshing this page.</h2>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment