Show Maintenance "Custom Message" to end User if server stops/down in payara

188 views Asked by At

My web application developed using (GWT/J2EE stack) is deployed on Payara glassfish server and its on production server. We frequently stops the server for maintenance like 'fixing bugs/for enhancement/upgrading'. If the end user try to access the web application and server is down it shows

"This site can’t be reached"

Is it possible to show the Custom message like Server is down for maintenance to end user? any thoughts/suggestion on this.

1

There are 1 answers

2
OndroMih On BEST ANSWER

This isn't related to Payara Server. If any server is down, it can't serve requests. The browser doesn't receive any reply and prints "This site can't be reached".

If you want to have control over what browsers display, you need to set up a proxy server that serves the requests and forwards them to Payara Server (e.g. Apache HTTP server or Nginx). ANd you have to configure it to return a response with a custom message if Payara Server is down.

To see how to set up a proxy server with Payara Server, have a look at these guides: