Maintainence Mode?

I cant see that virtualmin has any kind of ‘1_Click_make_my_life_easy’ maintenance mode button

or maybe I just cant find it?

if there isnt - it would be a useful thing to have.

maybe return an error code for a site - 503 (or somesuch more appropriate) while I upload new stuff, sort the db and tidy up etc etc. If it didnt do it for my ip it would be good for testing too

mostly I dont need it, but just now I have a situation/code where my dev area doesnt easily work.



rfc2616 says this about 503:

The server is currently unable to handle the request due to a
temporary overloading or maintenance of the server. The implication
is that this is a temporary condition which will be alleviated after
some delay. If known, the length of the delay MAY be indicated in a
Retry-After header. If no Retry-After is given, the client SHOULD
handle the response as it would for a 500 response.

so I guess option to set a Retry-After period would be useful


It doesn’t today, though that’d be an interesting idea.

ATM, if I were going to do that, I’d probably pop a .htaccess file in the public_html folder containing something like this:

Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_URI} !/maintenance.html$

RewriteRule $ /maintenance.html [R=302,L]

Mmh, actually yeah, this idea is not bad at all. Some forum and CMS softwares have such a feature too.

I second this for a future feature request, when the Virtualmin people have some time on their hands. :slight_smile:


.htaccess… yep - but this upgrade also involves .htaccess!

I’ve done it via httpd.conf and previously with a complete separate public_html dir and mv pu…html pu…bak mv pu…new etc

but a nice little ‘1_Click_make_my_life_easy’ button would be ideal :wink:

I think maybe the response should be 503 unavailable and a Retry-After timeout option, but it oughtnt to be too hard to leave options as user select… at some point when there’s a minute obviously!


One idea Jamie had would be to use the redirects feature for this, in Server Configuration -> Website Redirects.

If you go in there, click “Add a new website redirect”, set the “Source URL Path” to “/”, set “Include sub-paths in redirect” to “Yes”, and just make the site redirect to a maintenance page you have somewhere.

Would that by chance do what you’re after?


@Eric: Now if there was a feature to create (and remove) that kind of redirect for all vservers with one click… THAT’d be “maintenance mode”. :slight_smile: