subdomains in Vhosts

Apache, Lighttpd, nginx, Cherokee
Post Reply
wurtzel
Posts: 17
Joined: 2003-09-18 16:42
 

subdomains in Vhosts

Post by wurtzel »

ich habe folgendes Problem
ich habe im vhosts.d verzeichnis
meine conf-dateien

haupdomain :

Code: Select all

<VirtualHost 213.xxx.xxx.xxx:80>
    ServerAdmin webmaster@domain1.tld
    ServerName domain1.tld
    ServerAlias www.domain1.tld

    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot /verzeichnisVhost1/html

    # if not specified, the global error log is used
    ErrorLog /var/log/apache2/XXXXX-error_log
    CustomLog /var/log/apache2/XXXXXX-access_log combined

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName On

    # configures the footer on server-generated documents
    ServerSignature On
     Include /etc/apache2/conf.d/*.conf

    ScriptAlias /cgi-bin/ "/verzeichnisVhost1/html/cgi-bin/"

    <Directory "/verzeichnisVhost1/html/cgi-bin">
        AllowOverride None
        Options +ExecCGI -Includes
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule mod_userdir.c>
        UserDir public_html
        Include /etc/apache2/mod_userdir.conf
    </IfModule>


    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/verzeichnisVhost1/html">
        DirectoryIndex index.html index.htm index.html.var index.php

        Options Indexes FollowSymLinks

        AllowOverride None

        Order allow,deny
        Allow from all

    </Directory>

</VirtualHost>
subdomain:

Code: Select all

<VirtualHost 213.xxx.xxx.xxx:80>
    ServerAdmin webmaster@domain1.tld
    ServerName xxx.domain1.tld
    ServerAlias www.xxx.domain1.tld

    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot /verzeichnisVhost1/html

    # if not specified, the global error log is used
    ErrorLog /var/log/apache2/XXXXX-error_log
    CustomLog /var/log/apache2/XXXXXX-access_log combined

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName On

    # configures the footer on server-generated documents
    ServerSignature On
     Include /etc/apache2/conf.d/*.conf

    ScriptAlias /cgi-bin/ "/verzeichnisVhost2/html/cgi-bin/"

    <Directory "/verzeichnisVhost2/html/cgi-bin">
        AllowOverride None
        Options +ExecCGI -Includes
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule mod_userdir.c>
        UserDir public_html
        Include /etc/apache2/mod_userdir.conf
    </IfModule>


    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/verzeichnisVhost2/html">
        DirectoryIndex index.html index.htm index.html.var index.php

        Options Indexes FollowSymLinks

        AllowOverride None

        Order allow,deny
        Allow from all

    </Directory>

</VirtualHost>
mein problem ist nun das er alle anfragen auf die Hauptdomain leitet und die anfragen für die subdomain nicht da ankommen wo sie sollen.

was ist da an der configuration falsch??
wurtzel
Posts: 17
Joined: 2003-09-18 16:42
 

Re: subdomains in Vhosts

Post by wurtzel »

nach noch maligem suchen hab ich den Fehler gefunden

NameVirtualHost IP:Port
fehlte in der httpd.conf
Post Reply