How to configure a page to display while server is in planned maintenance in Jboss?

为君一笑 提交于 2019-12-08 07:51:10

问题


How to configure in Jboss, when server is in planned maintenance(not completely down), to display an error page? thanks.


回答1:


Two possibilities:

  1. Inside JBoss: during the time your application, say myapp.war, is down, you can deploy another myapp.war with just a single HTML/JSP file, displaying that the server is under maintenance. See Hello, World! Web App as an example for a simple web app.
  2. If your JBoss runs behind another webserver, such as Apache, you can enable a rewrite during maintenance:
    RewriteEngine on
    RewriteRule ^.*$ http://yourdoman.com/maintenance-info.html [L,R]
    

We use the second option because sometimes we also shutdown the JBoss instance.



来源:https://stackoverflow.com/questions/4320791/how-to-configure-a-page-to-display-while-server-is-in-planned-maintenance-in-jbo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!