TracNav
Core Features...
- Configuration File Syntax
- Configuration Options
- Change Root
- Performance
- PerformanceFastCGI
- SSL
- Traffic Shaping
- Using SMP
Modules...
- mod_accesslog
- mod_access
- mod_alias
- mod_auth
- mod_cache
- mod_cgi
- mod_cml
- mod_compress
- mod_deflate
- mod_dirlisting
- mod_evasive
- mod_evhost
- mod_expire
- mod_extforward
- mod_fastcgi
- mod_flv_streaming
- mod_geoip
- mod_magnet
- mod_mem_cache
- mod_mysql_vhost
- mod_proxy
- mod_redirect
- mod_rewrite
- mod_rrdtool
- mod_scgi
- mod_secdownload
- mod_setenv
- mod_simple_vhost
- mod_ssi
- mod_status
- mod_trigger_b4_dl
- mod_userdir
- mod_useronline
- mod_usertrack
- mod_webdav
Modules (1.5 only)...
- mod_proxy_core
- mod_sql_vhost_core
- mod_uploadprogress
- mod_deflate
Internals...
- FastCGI state-engine
- Plugin interface
- HTTP state-engine
Additional...
- User written Modules
Enhanced Virtual-Hosting
Module: mod_evhost
Description
mod_evhost builds the document-root based on a pattern which contains wildcards. Those wildcards can represent parts of the submitted hostname
%% => % sign %0 => domain name + tld %1 => tld %2 => domain name without tld %3 => subdomain 1 name %4 => subdomain 2 name evhost.path-pattern = "/home/www/servers/%3/pages/"
Options
- evhost.path-pattern
- pattern with wildcards to be replace to build a documentroot
Samples
User vhosts
$HTTP["host"] =~ "users\.example\.org" {
evhost.path-pattern = "/home/%4/public_html/"
}
http://johndoe.users.example.org/ => /home/johndoe/public_html/
General Example
server.document-root = "/home/user/sites/" evhost.path-pattern = "/home/user/sites/%0/site/"
If example.org is requested, and /home/user/sites/example.org/site/ is found, that path becomes the docroot.
If example.net is requested but is not found in ''/home/user/sites/ then the docroot remains as /home/user/sites/
This is actually a bad example. server.document-root should never point to the directory with your evhost subdirs.
Let us assume we got foo.example.com and bar.example.com pointing to the server. for foo.example.com we have /home/user/sites/foo.example.com/site but for bar no directory exists.
For foo.example.com we configure auth via:
$HTTP["host"] == "foo.example.com" {
auth.require = ( "/" => ...
)
}
If we now access http://bar.example.com/foo.example.com/site/ we bypass the configured auth in the vhost block.
A better example would be
server.document-root = "/home/user/sites/default/site" evhost.path-pattern = "/home/user/sites/%0/site/"

