QwiRed
 Home
 Spam
 QwiRed
 auth_ldap
The basic idea of QwiRed is to make configuration of Virtual Hosting easier.

Let's say you are a webhoster and you want to give your clients access to a phorum, a photoalbum, a poll machine, a weblog, a CMS... and you can find all of these applications on the Internet, as Free Software or Open Source software.

How to integrate these tools ? One tool needs a configuration file for each domain - another tool needs an entire installation per domain - a third tool has a template directory that differs per domain while the main installation is the same for each domain...

QwiRed could become a standard for developing web applications. A way to interface these applications with a centralized database of configuration options (preferably with a management tool).

In my opinion, web applications shouldn't write to disk. They should use a database to store all files, photo's, text, and configuration in.

While there are several drwabacks to that approach, and a decision has to be made on a case by case basis, there are numerous advantages.

For one, it's easy to move a domain or an application to another server (wether you are upgrading hardware, recovering from disaster, splitting servers for loadbalancing, or duplicating a site to form a basis for a new site). Just dump the database and create a new one on the new machine. No hassles with file permissions, and you might not even need root access.

Especially having the configuration in a database, simplifies things (in general). Adding a new domain or adding a specific application to a new domain, could be as simple as just making a new user via the management interface.

The way I do it is, more or less, like this:

1. in apache, I configure only ONE virtual host, that has all the nitty-gritty configuration needed for all the applications to run. Let's say I have two domains 'www.example.com' and 'www.example.net'. Both have a phpBB forum in /phpBB.

In apache, EVERY hostname that is sent in the HTTP/1.1 header, gets resolved to the same physical directory. Some rewrite rules make sure that they land into the right place. Let's say www.examle.com/phpBB and www.example.net/phpBB both point to /www/phpBB/index.php

Now the index.php script does this:

1. check the database (ldap, sql, whatever) to see if the hostname (that is given in $_SERVER['HTTP_HOST']) exists in the database.
If it doesn't exist, it immediately redirects to /www/unconfigured/index.php and displays a page that this host is not configured, but probably will be soon...

2. if it is in the database, it then checks if phpBB is configured for that hostname. If not, it redirects to a page that tells you that phpBB is not configured for that hostname, and gives instructions how to enable that service.

3. if phpBB is configured, it retrieves the databasename, user and password for phpBB, and then makes a new connection to retrieve all the phpconfiguration details from that specific database.

4. after that, it goes on as it would normally.

Now if you look at the config file for phpBB, you'll see that it's fairly easy to put what's in that textfile into a database. So, phpBB is easy to become 'QwiRed'.

However, the templates for phpBB are NOT easily put into a database.

You could 'solve' that by limiting the templates to those few you have chosen to present to all your users.

But it would be best if the phpBB developer made it possible to retrieve the template files from a database!

It's not very hard to do, and if I want to give some users control over their templates, then it's easier to tell them to type their templeate into some webform, then to generate an ftp account with the correct settings and let them ftp the stuff over. (And of course, for each new domain you must make the correct directory structure and set correct permissions).

Now, if phpBB would be entirely qwiredized, it would be a breeze to enable or disable or extend the application on a virtual hosting server.

Now extend this idea, this technique, to all kinds of applications. Weblogs, photoalbums, polls, phpnukes, wiki's, chatty things, what have you. If the developers could find a way to 'lift the application off the filesystem' making it float freely above the physical disk by putting a database layer between it, any webhoster could easily add applications to it's offerings.

Right now, one of my clients wants a weblog. The time I will need to invest into finding out which one I can use best, installng it, for this one user, is better spent qwiredizing the application, so I can enable it for ALL my users. And if all applications are qwiredized, it's easy to offer even competing applications - choice of three different forums, 5 blogs, 3 chats, phpnukes, (t)wiki's... so the user can choose the one that suits his or her needs best.

And, last but not least, upgrading should be very easy. Just upgrade the application in one place - not scattered throughout your user directories - and you're done.

Comments ? PLEASE write me: ace at suares.nl


Also see:
  • awstats forum


    I wrote this somewhere in 2003. Can't pinpoint the date exactly, yet.


  •      
    Curacao FOSS seminar: Newsforge and Pictures
    'How an open source community gets built' is the title of an article on Newsforge, reporting on the OSS-seminar thatr Stimul-IT and Suares & Co organized on Wednesday, 10th of November 2004 in Curacao, Netherlands Antilles.
    NEW! See the pictures!
    Developed with QwikZite (version 1.12)  Designed by Jan Veuger