lighttpd 1.4.x
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.0 KiB

MySQL bases vhosting
Module: mod_mysql_vhost
:Date: $Date: 2004/08/29 09:43:49 $
:Revision: $Revision: 1.1 $
This module provides virtual hosts (vhosts) based on a MySQL table
.. meta::
:keywords: lighttpd, mysql, vhost
.. contents:: Table of Contents
vhost via mysql
Example: ::
mysql-vhost.db = "lighttpd"
mysql-vhost.user = "lighttpd"
mysql-vhost.pass = "secret"
mysql-vhost.sock = "/var/mysql.lighttpd.sock"
mysql-vhost.sql = "SELECT docroot FROM domains WHERE domain='?'"
MySQL setup: ::
GRANT SELECT ON lighttpd.* TO lighttpd@localhost IDENTIFIED BY 'secret';
USE lighttpd;
CREATE TABLE domains (
domain varchar(64) not null primary key,
docroot varchar(128) not null
INSERT INTO domains VALUES ('host.dom.ain','/http/host.dom.ain/');