I am trying to use Nginx to redirect to a custom maintenance page, with it's own CSS/JS, when a maintenance file exists on the system. However, it just shows me the standard Nginx 503 redirect page?
location / {
if (-f /var/www/html/maintenance_mode_on){
return 503;
}
root /var/www/html/my_normal_site/;
index index.html index.htm;
}
error_page 503 @maintenance;
location @maintenance {
root /var/www/html/maintenance/;
index maintenance.html;
}