Subdomain bei Debian

Apache, Lighttpd, nginx, Cherokee
Post Reply
umbroboy
Posts: 258
Joined: 2005-05-11 11:49
 

Subdomain bei Debian

Post by umbroboy »

Hallo,

würde gern mehrere Subdomains einrichten.

Jetzt habe ich eine mail.conf erstellt die sich im Verzeichnis
/etc/apache2/conf.d befindet und so aussieht:

Code: Select all

##### 
# Webmail 
##### 
<VirtualHost XXX.XXX.XXX.XXX:80> 

DocumentRoot /var/www/horde 
Alias /horde /var/www/horde 
ServerName webmailer 
ServerAlias webmailer.* 
UseCanonicalName Off 
<Directory /var/www/horde> 
<IfModule sapi_apache2.c> 
    php_admin_flag engine on 
php_admin_flag magic_quotes_gpc off 
php_admin_flag safe_mode off 
php_admin_value open_basedir 
 
"/var/www/horde:/usr/share/php:/tmp:/var/qmail/bin/." 
php_admin_value include_path 
"/var/www/horde:/usr/share/php:/tmp:/var/qmail/bin/." 
</IfModule> 
Options -All +Includes +ExecCGI +FollowSymLinks 
                Order allow,deny 
                Allow from all 
</Directory> 
</VirtualHost> 
Die Apache 000-default sieht so aus:

Code: Select all

NameVirtualHost XXX.XXX.XXX.XXX:80 
<VirtualHost XXX.XXX.XXX.XXX:80> 
ServerAdmin webmaster@localhost 

        DocumentRoot /var/www/ 
        <Directory /> 
                Options FollowSymLinks 
                AllowOverride None 
        </Directory> 
       <Directory /var/www/> 
Die Subdomain geht jetzt auch, nur wenn ich auf die hauptdomain greife, werde ich auch auf das Verzeichnis von der subdomain geleitet.

Ebenso kommt diese Fehlermeldung beim Apachenreload:

Forcing reload of web server: Apache2[Sun Nov 13 17:30:31 2005] [warn]
VirtualHost XXX.XXX.XXX.XXX:80 overlaps with VirtualHost XXX.XXX.XXX.XXX:80,
the first has precedence, perhaps you need a NameVirtualHost directive

Steh ich jetzt auf dem Schlauch oder wo muss jetzt der Virtual Host hin und der NameVirtualHost??

Viele Grüße und Danke
Umbroboy
timeless2
Posts: 415
Joined: 2005-03-04 14:45
Location: Paris
 

Re: Subdomain bei Debian

Post by timeless2 »

Der NameVirtualhost kommt nur einmal hin. Weitere Virtualhosts machst du dann mit dem Virtualhost-Tag dazu, also:

Code: Select all

<VirtualHost XXX.XXX.XXX.XXX:80>
ServerName domain2.de
DocumentRoot /var/www/verzeichnis

....



</VirtualHost>
umbroboy
Posts: 258
Joined: 2005-05-11 11:49
 

Re: Subdomain bei Debian

Post by umbroboy »

Hi ,

das hab ich doch auch gemacht nur in einer zweiten Datei.

oder nicht?

*grübel*

PS: und wo steht der namevirtual host dann? in der 000-default datei oder?
umbroboy
Posts: 258
Joined: 2005-05-11 11:49
 

Re: Subdomain bei Debian

Post by umbroboy »

Hallo,

hat keiner eine idee?

:-(
ferdinand
Posts: 5
Joined: 2005-06-08 23:26
 

Re: Subdomain bei Debian

Post by ferdinand »

ist den deine zweite datei Included? z.B in deiner /etc/apache2/apache2.conf

Code: Select all

Include datei2.conf
umbroboy
Posts: 258
Joined: 2005-05-11 11:49
 

Re: Subdomain bei Debian

Post by umbroboy »

ja klar.

nur warum kommt dann diese meldung vom apachen:
Forcing reload of web server: Apache2[Sun Nov 13 17:30:31 2005] [warn]
VirtualHost XXX.XXX.XXX.XXX:80 overlaps with VirtualHost XXX.XXX.XXX.XXX:80,
the first has precedence, perhaps you need a NameVirtualHost directive
und wie 000-default muss ich ja lassen oder?

wo kommt der namevirtualhost eintrag rein?
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: Subdomain bei Debian

Post by rootsvr »

bei der Standard Debian installation kannst Du in /etc/apache2/sites-available einfach Dateien legen und nach /etc/apache2/sites-enabled verlinken.

alle Dateien (Links) in sites-enabled werden geladen.

Ich hab in einer Domain
NameVirtualHosts mei.net.oll.eIP
<VirtualHost *>
ServerName Hauptdomain
</VirtualHost>

In allen anderen steht IMHO:
<VirtualHost *>
ServerName meineDomain
ServerAlias http://www.meine.Domain
Post Reply