You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ishita Kapadiya <is...@gmail.com> on 2012/06/01 18:02:11 UTC
Re: [users@httpd] simple easy way to turn to maintenance mode
Hi,
I just want to add one more question -
Daniel's idea looks very good. but what if we also want to verify the
change by logging into the site (after application level change get
complete) and then open it up for all users.. is there any way to
achieve this?
On Thu, May 31, 2012 at 1:59 PM, Daniel Ruggeri <DR...@primary.net> wrote:
> On 5/27/2012 6:42 AM, Miguel Gonzalez wrote:
>> The version of Plesk we have doesn't support this so maybe there is any easy way to do this. I've thought about setting up a different instance of the web server or configure a different web server but maybe I'm missing an even simplier way to do this. In fact we only want to send a simple html response to the user.
>
> I'm a fan of using:
> <VirtualHost *:80>
> <IfDefine MAINTENANCE>
> RewriteRule .* /path/to/maintenance.html [L]
> </IfDefine>
>
> #Existing directives
> </VirtualHost>
>
>
> ... then, you only need to restart the server with -DMAINTENANCE to
> enable and restart without the define to disable maintenance mode.
>
> --
> Daniel Ruggeri
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] simple easy way to turn to maintenance mode
Posted by Jean-Christophe Boggio <ap...@thefreecat.org>.
Le 02/06/2012 15:27, Daniel Ruggeri a écrit :
> <VirtualHost *:80>
> <IfDefine MAINTENANCE>
> RewriteCond !%{HTTP_COOKIE} LetMeIn
> RewriteRule .* /path/to/maintenance.html [L]
> </IfDefine>
> </VirtualHost>
Elegant !
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] simple easy way to turn to maintenance mode
Posted by Daniel Ruggeri <DR...@primary.net>.
On 6/1/2012 11:02 AM, Ishita Kapadiya wrote:
> Daniel's idea looks very good. but what if we also want to verify the
> change by logging into the site (after application level change get
> complete) and then open it up for all users.. is there any way to
> achieve this?
Yes, you can control this with a condition (like looking for a specific
cookie, header or source IP address). In the example below, you would
use a cookie to gain access:
<VirtualHost *:80>
<IfDefine MAINTENANCE>
RewriteCond !%{HTTP_COOKIE} LetMeIn
RewriteRule .* /path/to/maintenance.html [L]
</IfDefine>
#Existing directives
</VirtualHost>
--
Daniel Ruggeri
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org