Skip to content

Instantly share code, notes, and snippets.

@siteshen
Created August 22, 2016 16:58
Show Gist options
  • Save siteshen/6103d954b8bfbc4179b1f904e9b78302 to your computer and use it in GitHub Desktop.
Save siteshen/6103d954b8bfbc4179b1f904e9b78302 to your computer and use it in GitHub Desktop.
Example nginx.conf of system maintaining.
server {
location / {
default_type application/json;
return 400 '{"data": {}, "meta": {"error_message": "系统维护中,预计5点完成", "success": false}}';
}
location /api {
default_type 'text/html';
return 200 '<center style="padding: 16em 0; color: #333;"><h1>系统维护中</h1><p>系统正在进行停机维护,预计8月23日凌晨5点完成。</p></center>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment