Forum Discussion
DaytonG_131489
Nimbostratus
Oct 09, 2013Serve maintenance page if file exists
We are hoping to let our developers control turning on maintenance pages for their sites. We were hoping that we could check for the existence of a file in (or outside) the application to determine w...
Kevin_Stewart
Employee
Oct 09, 2013Here's what Cory's description might look like:
ltm monitor http http_file_exists_test {
defaults-from http
destination *:*
interval 1
recv 404\\sNot\\sFound
recv-disable 200\\sOK
send "GET /foo.php HTTP/1.1\\r\\nHost: server\\r\\n\\r\\n"
time-until-up 0
timeout 16
}It's essentially the reverse of a normal monitor. Depending on how the web server responds to a file not found error (ie. 404 status code), the receive string would be the 404 response (doesn't exist so monitor is up), and receive disable string is the 200 OK (exists so monitor is down).
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects