Apache SubDomains

Alles, was den Apache betrifft, kann hier besprochen werden.

Apache SubDomains

Postby MisterNiceLP » 07. October 2014 13:43

Hey,

ich habe meine Domain (DTZ-Germany.de) auf meinen VServer weitergeleitet über einen A-Record. Habe dann unter apache mehrere sites angelegt. Einmal Hauptseiten
Code: Select all
<VirtualHost *:80>
        ServerAdmin admin@dtz-germany.de
        ServerName www.dtz-germany.de
        DocumentRoot /var/www/dtz-germany/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin admin@dtz-germany.de
        ServerName dtz-germany.de
        DocumentRoot /var/www/dtz-germany/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin admin@alpha-gaming.de
        ServerName www.alpha-gaming.de
        DocumentRoot /var/www/alpha-gaming/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin admin@alpha-gaming.de
        ServerName alpha-gaming.de
        DocumentRoot /var/www/alpha-gaming/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>


und foren:
Code: Select all
<VirtualHost *:80>
        ServerAdmin admin@dtz-germany.de
        ServerName www.forum.dtz-germany.de
        DocumentRoot /var/www/dtz-germany/forum/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin admin@dtz-germany.de
        ServerName forum.dtz-germany.de
        DocumentRoot /var/www/dtz-germany/forum/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin admin@alpha-gaming.de
        ServerName www.forum.alpha-gaming.de
        DocumentRoot /var/www/alpha-gaming/forum/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin admin@alpha-gaming.de
        ServerName forum.alpha-gaming.de
        DocumentRoot /var/www/alpha-gaming/forum/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>


Jetzt habe ich das Problem, wenn ich auf dtz-germany.de/forum oder forum.dtz-germany.de gehe komme ich immer auf die VServer IP. Die Dafault Site habe ich deaktiviert.
MisterNiceLP
 
Posts: 1
Joined: 07. October 2014 13:38
Operating System: Debian 7

Re: Apache SubDomains

Postby Nobbie » 07. October 2014 17:46

Eine Weiterleitung mit DNS A Record funktioniert nicht, weil das physikalisch eine Weiterleitung auf eine IP bedeutet (unter Verlust des Domainnamens, der wird nicht durchgereicht als sog. HOST). VirtualHosts funktionieren nur dann, wenn der Domain Name direkt mit der (Ziel) IP verknüpft ist, nicht als Weiterleitung.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 2 guests