Multiple Virtual host with Lighttpd 2.0
Added by brqx about 8 years ago
Hi friends,
I have installed successfully Lighttpd 2.0 on centos 7.
I've setup virtual host but don't work . Always be loaded the same domain :
--------------------------------------------------------------------------------------
I have in lighttpd.conf :
docroot "/domain_path/"; index [ "index.php", "index.html", "index.htm", "default.htm", "index.lighttpd.html" ]; var.vhosts = []; var.regex_vhosts = []; #Virtual hosts include "/etc/lighttpd2/domain.conf"; include "/etc/lighttpd2/subdomain_com.conf"; var.vhosts = var.vhosts + [ default => { vhost.map_regex var.regex_vhosts; } ]; vhost.map var.vhosts;
domain_com.conf :
var.vhosts = var.vhosts + [ "domain.com" => { docroot "/domain_path/"; } ]
subdomain_com.conf :
var.vhosts = var.vhosts + [ "subdomain.com" => { docroot "/subdomain_path/"; } ]
---------------------------------------------------
The problem is always is loaded domain.com what is associated with docroot defined in lighttpd.conf
Regards.
Ricardo / Brqx.