3 Domains with vhost don't work
Added by uri2510 almost 11 years ago
Hello,
I have the problem, that i have to work with 3 different domains. I tried to set up lighttpd like that:
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_fastcgi",
"mod_auth",
"mod_simple_vhost"
)
server.port = 80
server.bind = "w.x.y.z"
$HTTP["host"] != "abc.de" {
simple-vhost.server-root = "/var/www/"
simple-vhost.document-root = "/htdocs/"
simple-vhost.default-host = "def.eu"
}
$HTTP["host"] == "def.eu" {
server.document-root = "/var/www/def.eu/htdocs/"
server.error-handler-404 = "/e404.php"
}
$HTTP["host"] == "abc.de" {
server.document-root = "/var/www/abc.de/htdocs/"
server.error-handler-404 = "/e404.php"
}
$HTTP["host"] == "ghi.de" {
server.document-root = "/var/www/ghi.de/htdocs/"
server.error-handler-404 = "/e404.php"
}
Where is my mistake, or why does it not work?
Thanks in advance for any help
Ulf
Replies (1)
RE: 3 Domains with vhost don't work - Added by stbuehler almost 11 years ago
simple-vhost has a higher priority than server.document-root. only for the same option the last one set "wins", for different options the order in the config doesn't matter.