6th January 2009

Scheduled maintenance with mod_rewrite

Sunday, April 13th, 2008

A public sector customer recently had a requirement to redirect visitors to one of their applications to a holding page overnight while the company who support the application carried out some maintenance work. The work was being carried out between 1am and 7am to minimize disruption to the members of public who use the application.

Keen to help, but also to get a good nights sleep we looked to mod_rewrite to provide a solution (we manage the front end servers, which run Apache).

We added the following lines to our httpd.conf to redirect any traffic to the site to a holding page at /static/offline.php from 00:55 until 07:30 to a holding page:

RewriteEngine on
RewriteCond %{TIME} >20080407055000
RewriteCond %{TIME} <20080407073000
RewriteRule !^/static/offline.php$ /static/offline.php [PT,NS]

Alias /static "/var/www/www.example.com/static"

As the application sits on a Tomcat instance behind mod_proxy, we also added the following line to prevent mod_proxy from handling requests for the /static directory.

ProxyPass /static !

We created the offline.php file, including with the line below to ensure that search engines didn’t index the holding page.

header("HTTP/1.1 503 Service Temporarily Unavailable")

Support for Open Source software

Sunday, April 6th, 2008

We can provide remote or onsite support for Open Source operating systems (Linux / BSD) and applications such as the Apache webserver, Tomcat, MySQL. There are more examples of products we’ve worked on our experience page.

We’re comfortable working in mixed environments too, for example running Apache, MySQL and PHP on Windows (commonly known as the WAMP application stack)

Our experience

Sunday, April 6th, 2008

We have been working with Free and Open Source Software since 1998 and have worked with wide variety of customers, ranging in size from single employees through to large multinationals. An increasing amount of our work is with SME’s who are making use of Open Source software to reduce their IT costs. Our customers are in both the private and public sectors.

Free and Open Source software we work with

Our preferred Linux distributions are Debian, Ubuntu and Red Hat Enterprise Linux, but we have considerable experience with a wide range of Linux distributions. We are also experienced with BSD, in particular OpenBSD and FreeBSD.

We build mail servers based around either Exim, Postfix or Sendmail MTA’s and generally use Courier IMAP/POP3 server. We also utilise a number of open source anti-spam packages including SpamAssassin and amavis.

A lot of our work is building and supporting the infrastructure for web facing applications and websites. Generally this involves Apache HTTPd as the web server, with either a TomCat application server or PHP application. Generally these make use of a database such as MySQL or PostgreSQL. The most common configuration we work with now is known as the LAMP stack (Linux, Apache, MySQL, PHP). We’ve also made use of squid as a web content accelerator, and a caching proxy server.

We have setup and provided support for numerous Open Source web applications such as MediaWiki, Drupal, Blojsum and Wordpress (which we use to run this site).

We use Samba to allow customers to run Windows compatible file/print server without needing to run Windows.

We also work with a number of monitoring packages, and make extensive use of packages such as monit and smokeping as well as our own custom monitoring scripts to monitor our customers systems and networks.

These are just examples of our work, so if you have another Open Source system you’d like us to support then please contact us.

Home

Saturday, April 5th, 2008

Open Sourcery is an information technology consultancy specialising in providing support for Free and Open Source Software (”FOSS”). We specify, build and maintain secure, reliable intranet and internet facing systems built from Open Source software.

You can explore our site using the tabs at the top, or the links on the right hand side of the page. Alternatively, here are some good starting points:

About Us

Sunday, February 3rd, 2008

Open Sourcery is part of Red Cube Systems Limited, an IT consultancy established in 2001. The Open Soucery name was setup in order to reflect the fact that the majority of our work now consists of consultancy and support for systems built around Open Source software.