Created
March 24, 2020 19:14
-
-
Save rrichards/3b3f0df21e34ca1728f3b18632fb0873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen 443 ssl; | |
proxy_set_header X_FORWARDED_PROTO https; | |
ssl_certificate /etc/nginx/certificate.crt; | |
ssl_certificate_key /etc/nginx/certificate.key; | |
server_name XXXXXXXXXXXXXXXXXXX; | |
try_files $uri /system/maintenance.html @passenger; | |
location /get_500 { | |
return 500; | |
} | |
location /get_502 { | |
return 502; | |
} | |
location /get_503 { | |
return 503; | |
} | |
location /get_504 { | |
return 504; | |
} | |
location = /basic_status { | |
stub_status; | |
} | |
location @passenger { | |
passenger_enabled on; | |
passenger_min_instances 2; | |
} | |
root /mnt/my.XXXXXXXXXXXXXXXXXXXXXXX/current/public; | |
error_page 500 /500.html; | |
error_page 502 503 504 @503; | |
location = /50x.html { | |
root /mnt/my.XXXXXXXXXXXXXXXXXX.com/current/public; | |
} | |
location = /404.html { | |
root /mnt/my.XXXXXXXXXXXXXXXXXXXXXX.com/current/public; | |
} | |
location @503 { | |
rewrite ^(.*)$ /errors/503.html break; | |
} | |
if (-f /system/maintenance.html) { | |
return 503; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment