Subdomain Match?

Apache, Lighttpd, nginx, Cherokee
Post Reply
lucideye
Posts: 12
Joined: 2002-10-20 22:58
 

Subdomain Match?

Post by lucideye »

Hallo!

Ich wollte mal fragen, ob es möglich ist, eine Art Virtualhost-Match für alles was vor domain.tld steht einzurichten, so dass ich nicht jede einzelne Subdomain explizit in die httpd.conf eintragen muss.

Also so in der Art:

<VirtualHost 123.456.789.0>
DocumentRoot /usr/local/htdocs/domain.tld/sub
ServerName *.domain.tld
</VirtualHost>


Vielen Dank,

Alex
darkunicorn
Posts: 20
Joined: 2002-06-20 10:37
 

Re: Subdomain Match?

Post by darkunicorn »

Ja schon fast richtig.

Code: Select all

<VirtualHost 123.456.789.0>
DocumentRoot /usr/local/htdocs/domain.tld/sub
ServerName domain.tld
ServerAlias *.domain.tld
</VirtualHost>
So gehts ;)
[tom]
Posts: 656
Joined: 2003-01-08 20:10
Location: Berlin
 

Re: Subdomain Match?

Post by [tom] »

Ja, das geht. Mit dem Alias.

Code: Select all

ServerAlias *.domain.de
[TOM]
lucideye
Posts: 12
Joined: 2002-10-20 22:58
 

Re: Subdomain Match?

Post by lucideye »

Stimmt! Supi! Danke! :-D
Post Reply