Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 27th May 2009, 22:16
necromncr necromncr is offline
Junior Member
Join Date: Jul 2008
Posts: 9
Thanks: 1
Thanked 6 Times in 3 Posts
Default HOWTO - "We're currently unavailable, please return later" - my way


Here I am writing again and to be completely honest with you - it's in a selfish way. I'm writing this because I need this feature once again in 2 weeks and forgot to make a backup of my old files. So here goes!

This will show your visitors a friendly message that entire hosting operation has been 'shut down' during maint. period (while you copy all your data to a new server, perhaps?).

What I did was:
1.) created new /var/www2 folder
2.) installed lighttpd and made the following modifications to it:
a) changed it's document-root to folder made in step 1
b) added redirect to match any request
3.) shutdown apache and started lighttp
4.) tested the whole thing (you dont want to be mocked by your customers and your competition!) ;-)

This HOWTO is written for Debian and ISPConfig 2.x but it's easly adaptible to anything that runs Linux.

0.) You'll need a notice.html file with some sort of notice for your customers. You can easily change the name to anything you like, even use php file. See below.

1.) Create new folder for lighttpd:
mkdir /var/www2
2.) Install lighttpd and modify it:
apt-get install lighttpd
Modify document-root. Open /etc/lighttpd/lighttpd.conf and modify this line:
server.document-root       = "/var/www/"
into this:
server.document-root       = "/var/www2/"
Add redirect code:
$HTTP["url"] !~ "^/notice.html|/notice.png$" {
        url.redirect = (
                ".*" => "http://www.example.net/notice.html"
This checks if request comes in that's not our system not available notice and redirects to your web server.
Be sure to match the urls (notice.html) otherwise you'll get an endless loop!

3.) Stop your apache and start lighttpd. If you're upgrading / moving your sistem it might be a good idea to stop ISPConfig too or at least block it.

4.) Go and check one of your customer domains. It should show your system notice on your www.example.net/notice.html page.

Hope this will be helpful for any of you and good luck upgrading / moving your ISPConfig!

Last edited by necromncr; 7th October 2009 at 15:01. Reason: Spelling errors - what was I thinking??
Reply With Quote
The Following 3 Users Say Thank You to necromncr For This Useful Post:
altaibskt (10th June 2009), falko (28th May 2009), till (28th May 2009)
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remoting bernholdt General 6 24th June 2011 14:38
Opening TPC ports thehappyappy Installation/Configuration 12 7th May 2008 19:39
Trouble with Postfix setup not working wmkconn Server Operation 13 9th April 2008 22:45
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 20:38
courier reading virtusertable? lerra Tips/Tricks/Mods 5 10th September 2006 11:12

All times are GMT +2. The time now is 07:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.