Forums / General / under maintenance

under maintenance

Author Message

Pascal Specht

Tuesday 12 August 2008 3:14:24 am

This is maybe not 100% an eZ Publish issue, but I'd like to know if some of you came up with an easy to use mechanism to put a site offline for some time with some 'under maintenance' kind of screen.

I know this can be done manually by hacking the .htaccess file or overriding the index.php, but I'm looking ofr a better solution where customers coming through a bookmark to any of the pages would also get the maintenance screen.
How did you deal with this issue?

Thanks for your input,
</Pascal>

Steven E. Bailey

Tuesday 12 August 2008 9:14:50 am

What we do is redirect the apache "Access Denied" page to our own internal page with a maintenance page and then block access to all but our own ip. These are the relevant lines in our virtual host file:

# --construction, uncomment this:
# ErrorDocument 403 http://ezpublish/construction/index.html
<Directory /var/www/ezpublish>
Options FollowSymLinks -Indexes ExecCGI
AllowOverride None
# --construction, uncomment this:
# Order deny,allow
# Deny from all
# Allow from 10.0.0.1
# --live, uncomment this:
Order allow,deny
Allow from all
</Directory>

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Damien Pobel

Tuesday 12 August 2008 12:56:55 pm

Hi Pascal,

I use a rewrite rule in .htaccess file :

RewriteEngine on
RewriteRule  (.*) /path/to/your/maintenance/file/index.htm [L]

I give some details on my blog : http://pwet.fr/blog/putting_a_site_under_maintenance

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Pascal Specht

Wednesday 13 August 2008 12:29:40 am

Hi Damien, hi Steven,

Thanks for your suggestions. I think I'm going to put something together some day with an easy-to-use checkbox in the admin interface, and will post it as an extension on the contribution area.

</Pascal>

Domenico Garozzo

Monday 10 May 2010 8:55:42 am

Hi,

for put your site under manteinance you can create a index.html file with your custom message.

Then open .htaccess immediatly after the line

RewriteEngine On

Add this line

RewriteRule \.(gif|jpg|png|css|js)$ - [L]
RewriteCond %{REQUEST_URI} !^.*/plain_site.*$
RewriteCond %{REQUEST_URI} !^.*/plain_site_admin.*
$RewriteRule (.*) index.html [L]

Obviously plain_site and plain_site_admin are standard site access that you replace with your siteaccess.

Sorry for my english and i hope if this can help you.

Rawflow

eZ debug

Timing: Jan 18 2025 02:07:41
Script start
Timing: Jan 18 2025 02:07:41
Module start 'content'
Timing: Jan 18 2025 02:07:41
Module end 'content'
Timing: Jan 18 2025 02:07:41
Script end

Main resources:

Total runtime0.1480 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.7031180.8516
Module start 'content' 0.00490.0042 769.554797.9297
Module end 'content' 0.00910.1387 867.4844526.4844
Script end 0.1478  1,393.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00322.1681200.0002
Check MTime0.00130.8677200.0001
Mysql Total
Database connection0.00050.349410.0005
Mysqli_queries0.107372.47321410.0008
Looping result0.00150.98331390.0000
Template Total0.138493.510.1384
Template load0.00090.587210.0009
Template processing0.137692.945010.1376
Override
Cache load0.00060.426410.0006
Sytem overhead
Fetch class attribute can translate value0.00050.352610.0005
XML
Image XML parsing0.00020.139210.0002
General
dbfile0.00221.4758200.0001
String conversion0.00000.003230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs