Page 1 of 1

lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 19:32
by hugo
Salve!
Ich übe mich gerade am lighttpd, läuft auch soweit ganz gut.
Frage mich gerade nur ganz stark, wie stelle ich ein, dass z.B. folgendes funktioniert:

http://www.ichunddu.de, http://www.ich-und-du.de, http://www.ich_und_du.de

Diese Domains sollen alle zusammen ein Docroot etc. bekommen.
Doch wie?

Danke für eure Hilfe,
Hugo

Re: lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 20:40
by zg0re
Welches vhost-Modul benutzt du denn? Das Mysql- oder das simple vhost-Modul? Ist eigentlich egal ;) Stell einfach für alle domains den gleichen docroot ein, oder alternativ kannst du per mod_redirect alle auf eine domain weiterleiten.

Re: lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 20:43
by hugo
Salve!
Simple vHost setze ich ein. ;)

Hugo

Edit:

Code: Select all

$HTTP["host"] =~ "^(www.)?ichunddu.de" {
 var.servername = "ichunddu.de"

 include "incl-base.conf"
 include "incl-fastcgi-php.conf"

 $HTTP["url"] =~ "^/up/" {
  dir-listing.activate = "enable"
 }
}
So sieht es bei mir z.Zt. aus, dann müsste ich diesen Code ja doppelt haben, mit dem Unterschied in "ich-und-du.de".
Das ist irgendwie unpraktisch.

Re: lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 20:46
by zg0re
Grad in die config von simple vhost geschaut, und da wird folgendes gesagt:

You can use symbolic links to map several hostnames to the same directory.

Re: lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 20:47
by hugo
Salve!
Das verstehe ich nun nicht, wie sollen mir simbolic links hier helfen?

Hugo

Re: lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 20:53
by lord_pinhead
Rein Theoretisch:
$HTTP["host"] =~ "(^|.)(test1.com|test2.com|test3.com)$"

Ungetestet!!

Re: lighttpd - Mehere Domains, ein vHost?

Posted: 2006-09-07 21:00
by hugo
Salve!
Danke dir, ich stand hier total auf dem Schlauch ... ;)
Funktioniert.

Stephan