Project

General

Profile

Dynamic redirection plugin (mod_maintenace) at Google code

Added by stj over 13 years ago

Just in case anyone is interested:
I have uploaded a lighttpd plugin to Google code that provides a mechanism to dynamically redirect requests to specific domain names to another URL.

The redirection configuration can be changed dynamically without restarting the server/reloading the configuration.

It does so by periodically (every x seconds, configurable) reading a configuration file with domain names and redirects all incoming requests to an alternative URL if the requested domain name is in the list.

The purpose of the module is to serve maintenance pages from another server while an application (identified by a specific domain) is in planned maintenance (update/upgrade of source code).

Access to the domain name can still be granted to requests coming from specific IP addresses (internal users that verify the application is still ok and confirm the maintenance mode can be turned off).

Using mod_magnet with LUA might be an alternative approach, however, this solution might come into play if LUA is not a valid alternative for any reason.

The plugin is based on lighttpd 1.4.27 and is available at Google code:
http://code.google.com/p/lighttpd-mod-maintenance/

Use it at your own risk. Feedback on the plugin is appreciated.