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.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th May 2009, 21: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

Hi,

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:
Code:
mkdir /var/www2
2.) Install lighttpd and modify it:
Code:
apt-get install lighttpd
Modify document-root. Open /etc/lighttpd/lighttpd.conf and modify this line:
Code:
server.document-root       = "/var/www/"
into this:
Code:
server.document-root       = "/var/www2/"
Add redirect code:
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 14: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
Reply

Bookmarks

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 13:38
Opening TPC ports thehappyappy Installation/Configuration 12 7th May 2008 18:39
Trouble with Postfix setup not working wmkconn Server Operation 13 9th April 2008 21:45
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
courier reading virtusertable? lerra Tips/Tricks/Mods 5 10th September 2006 10:12


All times are GMT +2. The time now is 13:27.


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