mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 01:02:09 -05:00
32 lines
899 B
Nginx Configuration File
32 lines
899 B
Nginx Configuration File
|
|
worker_processes 1;
|
|||
|
|
daemon off;
|
|||
|
|
|
|||
|
|
error_log ./error.log;
|
|||
|
|
events { worker_connections 8192; }
|
|||
|
|
|
|||
|
|
http {
|
|||
|
|
charset utf-8;
|
|||
|
|
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
|
|||
|
|
access_log ./access.log cloudfoundry;
|
|||
|
|
|
|||
|
|
keepalive_timeout 30;
|
|||
|
|
server_tokens off;
|
|||
|
|
|
|||
|
|
server {
|
|||
|
|
listen {{port}};
|
|||
|
|
server_name localhost;
|
|||
|
|
|
|||
|
|
location / {
|
|||
|
|
set $RESP '{';
|
|||
|
|
set $RESP '${RESP} "status_code": 503,';
|
|||
|
|
set $RESP '${RESP} "errors": [ {';
|
|||
|
|
set $RESP '${RESP} "error": "PlannedMaintenanceError",';
|
|||
|
|
set $RESP '${RESP} "message": "We’re performing some essential updates. Notify will be back shortly. Please check https://status.notifications.service.gov.uk/ for more details"';
|
|||
|
|
set $RESP '${RESP} } ] }';
|
|||
|
|
|
|||
|
|
add_header Content-Type application/json;
|
|||
|
|
return 503 '$RESP';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|