Awstats and easy Virtual Server Config

Ace Suares
  • Ace Suares

    Ace Suares - 2005-02-08


    I'd like to introduice an idea to you all, and see if it is possible to develop that idea for awstats.

    Short story: Can awstats be configured in such a way that NO changes to the filesystem are needed when the sysadmin adds a new virtual host ?

    Long story: I am using a (homebrewn) content management system. It uses mysql as its database. Adding a new virtual host is done as follows:
    1. create a new mysql database.
    2. copy the basic data into the new database
    3. assign users and password and permissions for that database (in the mysql database)
    4. insert a record in a special mysql database, that keeps track of which virtualhost are deployed.

    After I did this (with a script) I do NOT have to restart Apache! This is because the default host points to a php-script that uses SERVER_NAME as key to lookup this virtual host in the specialmysql database. If it doesn't exist, it displays 'web site not found' but if it does exist, it just loads the proper database for that virtual host and starts displaying the pages.

    I would like to integrate awstats (and many other applications) into that structure.

    Do you see that as feasible ?

    As far as I can oversee the situation, this needs to be addressed:

    1. there needs to be an environment variable SERVER_NAME that can be used in awstats. I believe that already exists
    2. awstats needs a way to consult the database to check if this SERVER_NAME exists and if yes, if it has access to the stats.
    3. based on various data from the mysql database, some other options might be configured - for instance logfile name, datadir, some options like 'onlyauthenticatedusers' and such.

    For more information about this idea, also see

    The reason I would like to see such a thing, is that I can then do with ONLY ONE install of awstats, and that is upgraded, it's of course automatically upgraded for all sites. Also, no root privileges are needed to add a virtual host.

    Many greetings
    Ace Suares.

    • Ace Suares

      Ace Suares - 2005-08-13

      Did not anybody ever respond to this ?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks