Problem mit Subdomains - nur eine!?

Apache, Lighttpd, nginx, Cherokee
Post Reply
p2p
Posts: 95
Joined: 2003-04-07 06:57
 

Problem mit Subdomains - nur eine!?

Post by p2p »

Hallo
Folgender Code in der httpd.conf:

Code: Select all

<VirtualHost 217.160.0.0:81>
  ServerName phpmyadmin.pxxxxx.pureserver.info
  DocumentRoot /home/www/phpmyadmin
</VirtualHost>


<VirtualHost 217.160.0.0:81>
  ServerName confixx.pxxxxxx.pureserver.info
  CustomLog /var/log/httpd/pxxxx.pureserver.info_access.log "%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agen$
  ErrorLog /var/log/httpd/pxxxx.pureserver.info_error.log
  DocumentRoot /home/www/confixx/html
  php_admin_value safe_mode_exec_dir /home/www/confixx/bin
  php_admin_value upload_tmp_dir /home/www/confixx/tmp
  ScriptAlias /cgi-bin/ /home/www/confixx/html/cgi-bin/
</VirtualHost>
Egal wie ich die Reihenfolge von beiden schreibe und egal welche Subdomain ich in der Adressleiste aufrufe, es wird immer das jeweils erste geschriebe DocumentRoot aufgerufen.

Irgendjemand eine Idee warum?

Vielen Dank
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: Problem mit Subdomains - nur eine!?

Post by dodolin »

http://httpd.apache.org/docs/mod/core.h ... irtualhost
The NameVirtualHost directive is a required directive if you want to configure name-based virtual hosts.
Ebenso lesenswert: http://httpd.apache.org/docs/vhosts/details.html
An In-Depth Discussion of Virtual Host Matching
Beschreibt äusserst detailliert, wie Apache genau entscheidet, welchen vhost er auswählt.

Auch dort ist u.a. zu finden:
Unless a NameVirtualHost directive is used for a specific IP address the first vhost with that address is treated as an IP-based vhost. In 1.3.13 and later that includes the IP address *.
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Problem mit Subdomains - nur eine!?

Post by captaincrunch »

Schon wieder ein Fall von "ich sag euch meine IP nicht, weil ich mich damit sooo viel sicherer fühle" ? :wink:

Ich glaube nämlich kaum, dass dein Apache auf die Netzadresse 217.160.0.0 lauschen wird ... falls es sich hierbei wirklich nur wieder um "Verschleierungstaktik" handeln sollte, siehe dodolin ...
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
p2p
Posts: 95
Joined: 2003-04-07 06:57
 

Re: Problem mit Subdomains - nur eine!?

Post by p2p »

CaptainCrunch wrote:Ich glaube nämlich kaum, dass dein Apache auf die Netzadresse 217.160.0.0 lauschen wird ...
Richtig geglaubt :)
Aber danke für den Link, der hat mir weitergeholfen!

Gruß p2p
Post Reply