Automated Apache Server Maintenance Page

I have a website running on the Linux / Apache / Tomcat stack that needs to be automatically shut down every few months to serve the server, which will be arbitrary. What are some options for downloading Apache and removing the Server Maintenance page?

I need to be able to control this through a shell script. (The answers that Google provided revolve around manually, changing the server configuration, and I don’t want to be in the office at 3 a.m.!) I suppose I could make the script drop in the .htaccess file and delete it when it does. less graceful.


Reply to comment:

Mike's answer looks like the answer from best practices, although what I will do is probably more like Dan answer , because a third-party hosting provider controls the load balancer, and I do not want to deal with this mess. Thank!

+3
source share
4 answers

, , , apache. loadbalancer . - - Apache, , HTML. HTTP, . : , - IP , . , , . , - , , . script , , - .

PS. Load Master 1500 loadbalancer.

+5

Apache . :

httpd -f <config>

script . script Apache .

+3

2

, , "" .

IIRC apache CPP

+1

We did something similar. We have index.html, which is redirected to our main page of the site. When we have the service, we run a script that changes the redirection in the html file. Then we through the script in the cron and viola auto-service window.

Hope this helps!

0
source

Source: https://habr.com/ru/post/1697174/


All Articles