Annotation of embedaddon/lighttpd/doc/outdated/mysqlvhost.txt, revision 1.1

1.1     ! misho       1: ====================
        !             2: MySQL-based vhosting
        !             3: ====================
        !             4: 
        !             5: -----------------------
        !             6: Module: mod_mysql_vhost
        !             7: -----------------------
        !             8: 
        !             9: :Author: ada@riksnet.se
        !            10: :Date: $Date: 2004/08/29 09:43:49 $
        !            11: :Revision: $Revision: 1.1 $
        !            12: 
        !            13: :abstract:
        !            14:   This module provides virtual hosts (vhosts) based on a MySQL table
        !            15: 
        !            16: .. meta::
        !            17:   :keywords: lighttpd, mysql, vhost
        !            18: 
        !            19: .. contents:: Table of Contents
        !            20: 
        !            21: Description
        !            22: ===========
        !            23: 
        !            24: With MySQL-based vhosting you can store the path to a given host's
        !            25: document root in a MySQL database.
        !            26: 
        !            27: .. note:: Keep in mind that only one vhost module should be active at a time.
        !            28:           Don't mix mod_simple_vhost with mod_mysql_vhost.
        !            29: 
        !            30: Options
        !            31: =======
        !            32: 
        !            33: Example: ::
        !            34: 
        !            35:   mysql-vhost.db             = "lighttpd"
        !            36:   mysql-vhost.user           = "lighttpd"
        !            37:   mysql-vhost.pass           = "secret"
        !            38:   mysql-vhost.sock           = "/var/mysql.lighttpd.sock"
        !            39:   mysql-vhost.sql            = "SELECT docroot FROM domains WHERE domain='?'"
        !            40: 
        !            41: 
        !            42: MySQL setup: ::
        !            43: 
        !            44:   GRANT SELECT ON lighttpd.* TO lighttpd@localhost IDENTIFIED BY 'secret';
        !            45: 
        !            46:   CREATE DATABASE lighttpd;
        !            47: 
        !            48:   USE lighttpd;
        !            49: 
        !            50:   CREATE TABLE domains (
        !            51:     domain varchar(64) not null primary key,
        !            52:     docroot varchar(128) not null
        !            53:   );
        !            54: 
        !            55:   INSERT INTO domains VALUES ('host.dom.ain','/http/host.dom.ain/');
        !            56: 
        !            57: 
        !            58: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>