Take single site down for port based multi tenancy - jigneshpshah/greycube_helpmanual GitHub Wiki

In Port based multi tenancy the site which is set in use can be taken down.

  1. Add File maintenance_on.html at location

/home/frappe/frappe-bench/sites/site1.local/maintenance_on.html

the path can be different , based on this path the condition is set to check if file exist

  1. Go to

/home/frappe/frappe-bench/config open nginx.conf

go to

location / {
try_files /demo.flexone.com/public/$uri @webserver;
}

add if condition to check if the file is available as below raise error 503

location / {
if (-f /home/frappe/frappe-bench/sites/site1.local/maintenance_on.html) {
return 503;
}

try_files /demo.flexone.com/public/$uri @webserver;
}

  1. handle error 503 error by adding the below code

error_page 503 /maintenance_on.html;
location = /maintenance_on.html {
root /home/frappe/frappe-bench/sites/site1.local;
}

  1. run command

sudo service nginx restart

  1. Check the current site e.g. http://142.93.27.142:82/login#login it will be down, while all other sites will be up

http://142.93.27.142/login#login

⚠️ **GitHub.com Fallback** ⚠️