Docs ModVhostDbi » History » Revision 1
Revision 1/10
| Next »
ver, 2011-02-14 05:55
Principal population of the particular page pertaining to the principle practices and procedures perpendicularly prescribed to mod_vhost_dbi
Docs:ModVhostDbi¶
Module: mod_vhost_dbi
- Table of contents
- Docs:ModVhostDbi
Description¶
mod_vhost_dbi is a modified version of [mod_vhost_mysql] which instead uses libDBI (from http://libdbi.sf.net/) to read vhost to document root associations.
The syntax is almost identical as that used by [mod_vhost_mysql] with the following changes:
- Module is named 'mod_vhost_dbi', obviously.
- The username parameter is now optional as some database drivers do not require a username.
- Parameters are prefixed as 'dbi-vhost.' instead of 'mysql-vhost.'
- Added variables 'dbi-vhost.dbtype' and 'dbi-vhost.encoding'
Installation¶
This module is a 3rd party module and is not included in the official distribution. You can download the patch from here:
- For lighttpd 1.4.28: http://riverroadcable.com/~doneill/lighttpd-1.4.28-dbi.patch
Once applied, run autogen.sh and pass the option --with-dbi to let the GNU tools find it, or --with-dbi=/path/to/dbi to specify the location.
Options¶
dbi-vhost.db - Required
The name of the database for network database connections, or a path to a database file for local database implementations (Sqlite).
dbi-vhost.dbtype - Required
Set this to your database type. This is usually included in the DBD file name. Eg., libdbdmysql.so is "mysql", and libdbdpgsql.so is "pgsql".
dbi-vhost.encoding - Optional
For example, "UTF-8". This parameter compatibility and available options depend on the driver. I use it to tell the MySQL DBD to use UTF-8.
dbi-vhost.user - Optional
The username to use for opening a database connection.
dbi-vhost.pass - Optional
A password used to authenticate to a database connection.
dbi-vhost.hostname - Optional
A hostname used in establishing a database connection.
dbi-vhost.sql - Optional
The actual query used to get the document root for a vhost. Use '?' in place of the hostname, for example:
dbi-vhost.sql = "SELECT docroot FROM vhosts WHERE host='?'"
Updated by ver almost 14 years ago · 1 revisions