Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Apache, Lighttpd, nginx, Cherokee
Post Reply
cyberian01
Posts: 6
Joined: 2002-11-22 02:36
 

Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by cyberian01 »

Hallöchen,
ich habe hier ein Problem, wie mir scheint mit den VirtualHosts in der httpd.conf. Es sieht folgendermaßen aus. Wenn jemand z.B. hallo.domain1.tld eingibt, dann soll er auf eine Seite geleitet werden wo ihm alle Subdomains der domain1.tld gezeigt werden. (Das funktioniert soweit siehe * Eintrag)
Außerdem möchte ich bei simpler Eingabe der Server Ip (oder nicht durch VHosts anderweitig spezifizierten Domainnamen) auf eine bestimmte Seite umgeleitet werden. (siehe ersten VHost)
Ansonsten sollen http://www.domain1.tld und domain1.tld auf ein bestimmtes Dir geleitet werden und board.domain1.tld auf ein anderes. Eigentlich funktioniert auch alles nur das ich bei eingabe von domain1.tld immer im Pfad des "Standard VHosts" also des ersten lande, wo ich ja nun nicht hin will. Ich verstehe nicht so ganz wo der Fehler liegt, vielleicht hat einer von euch ne idee. Hier mal der relevante Teil der httpd.conf:

Code: Select all

<VirtualHost 217.160.xxx.xxx:80>
        DocumentRoot /home/confixx/html/gesperrt
</VirtualHost>

# VirtualHost Config für Domain1.tld
<VirtualHost 217.160.xxx.xxx:80>
        ServerName domain1.tld
        ErrorLog /var/log/httpd/web1-error_log
        CustomLog /var/log/httpd/web1-access_log common
        ServerAdmin webmaster@domain1.tld
        ServerAlias www.domain1.tld
        DocumentRoot /home/www/web1/html
</VirtualHost>

<VirtualHost 217.160.xxx.xxx:80>
        ServerName board.domain1.tld
        ErrorLog /var/log/httpd/web1-error_log
        CustomLog /var/log/httpd/web1-access_log common
        ServerAdmin webmaster@domain1.tld
        DocumentRoot /home/www/web1/sub-board
</VirtualHost>

<VirtualHost 217.160.xxx.xxx:80>
        ServerName *.domain1.tld
        ErrorLog /var/log/httpd/web1-error_log
        CustomLog /var/log/httpd/web1-access_log common
        ServerAdmin webmaster@domain1.tld
        ServerAlias *.domain1.tld
        DocumentRoot /home/www/web1/no-sub
</VirtualHost>
sign CyBerian
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?

Post by jtb »

CyBerian01 wrote:

Code: Select all


# VirtualHost Config für Domain1.tld
<VirtualHost 217.160.xxx.xxx:80>
        ServerName domain1.tld
        ErrorLog /var/log/httpd/web1-error_log
        CustomLog /var/log/httpd/web1-access_log common
        ServerAdmin webmaster@domain1.tld
        ServerAlias www.domain1.tld
        DocumentRoot /home/www/web1/html
</VirtualHost>
ändere den ServerAlias auf:

Code: Select all

ServerAlias www.domain1.tld domain1.tld
[/quote]
cyberian01
Posts: 6
Joined: 2002-11-22 02:36
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by cyberian01 »

danke für den Tipp. Das habe ich zwischenzeitlich auch schon versucht. Führte jedoch leider nicht zu dem gewünschten Ergebnis.
Ich bin auch davon ausgegangen, das es eigenltich nicht so schwer sein kann und ein simpler weiterer ServerAlias Eintrag reichen müßte. Leider funktioniert das nicht. :(
Ich weiß auch nicht mehr weiter.
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by jtb »

CyBerian01 wrote:danke für den Tipp. Das habe ich zwischenzeitlich auch schon versucht. Führte jedoch leider nicht zu dem gewünschten Ergebnis.
Ich bin auch davon ausgegangen, das es eigenltich nicht so schwer sein kann und ein simpler weiterer ServerAlias Eintrag reichen müßte. Leider funktioniert das nicht. :(
Ich weiß auch nicht mehr weiter.
sicher, dass das nicht funktioniert??
Apache neugestartet usw.?

Hast du zweimal ServerAlias in den Vhost eingetragen oder im Format wie in meinem ersten Post?
cyberian01
Posts: 6
Joined: 2002-11-22 02:36
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by cyberian01 »

Ich habs genau so drin stehen gehabt wie du es vorgeschlagen hast.
Weil ich mir aber gerade nicht mehr ganz sicher war, habe ich es nochmal geändert, den Apache neugestartet und naja leider immer noch dasgleiche Problem wie vorher. Aus diesem Grund bin ich ja so ratlos :(
Ich weiß einfach nicht mehr weiter.
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by jtb »

mmh, so funktioniert es bei mir und so steht es eigentlich auch in der Doku :cry:
Many servers want to be accessible by more than one name. This is possible with the ServerAlias directive, placed inside the <VirtualHost> section. For example if you add this to the first <VirtualHost> block above

ServerAlias domain.tld *.domain.tld
then requests for all hosts in the domain.tld domain will be served by the http://www.domain.tld virtual host. The wildcard characters * and ? can be used to match names. Of course, you can't just make up names and place them in ServerName or ServerAlias. You must first have your DNS server properly configured to map those names to an IP address associated with your server.
Hast du es testweise mal nur mit domain.tld ohne http://www.domain.tld im ServerAlias ausprobiert?
cyberian01
Posts: 6
Joined: 2002-11-22 02:36
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by cyberian01 »

jep habe auch mal nur domain1.tld verwendet. ohne http://www.domain1.tld
Hat nur leider zum gleichen Ergebnis geführt. Ich weiß langsam nicht mehr weiter :?: hmmm
demux
Posts: 77
Joined: 2002-06-17 11:39
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by demux »

vieleicht liegts am DNS, das für den "domain.tld" keinen eintrag vorhanden ist !?

Geht ein "ping domain.tld" ?

demux !
cyberian01
Posts: 6
Joined: 2002-11-22 02:36
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by cyberian01 »

jep das geht.
Wenn ich nur domain1.tld eingebe lande ich ja bei folgenden VHost:

Code: Select all

<VirtualHost 217.160.xxx.xxx:80>
        DocumentRoot /home/confixx/html/gesperrt
</VirtualHost>
ich weiß wirklich nicht mehr weiter :roll:
helmuts
Posts: 45
Joined: 2002-07-01 10:31
Location: Berlin
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by helmuts »

Genau den Eintrag

<VirtualHost 217.160.xxx.xxx:80>
DocumentRoot /home/confixx/html/gesperrt
</VirtualHost>

setze mal ans Ende der Datei.
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by jtb »

helmuts wrote:Genau den Eintrag

<VirtualHost 217.160.xxx.xxx:80>
DocumentRoot /home/confixx/html/gesperrt
</VirtualHost>

setze mal ans Ende der Datei.
warum? Die Domain, die alles nicht behandelte bekommen soll, muss doch AFAIK oben stehen..
helmuts
Posts: 45
Joined: 2002-07-01 10:31
Location: Berlin
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by helmuts »

Probiers doch mal, bei mir hats geholfen, bei anderen auch. Warum? Keine Ahnung.
cyberian01
Posts: 6
Joined: 2002-11-22 02:36
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by cyberian01 »

Ich bin ja inzwischen für alle Möglichkeiten offen
aber wenn ich den Eintrag ans Ende der Config Datei setze, dann kann ich zwar die http://www.domain1.tld per domain1.tld erreichen aber, dann lande ich z.B. auch durch eingabe der Server Ip auf http://www.domain1.tld. Was ja klar ist, da dann ja dieser VHost zum standard wird :(
Also so langsam gehen mit wirklich die Ideen aus.
itmaster
Posts: 4
Joined: 2002-08-28 19:55
 

Lösung gefunden ?

Post by itmaster »

hallo...

habe exakt das gleiche problem.
ist da inzwischen eine lösung bekannt ?

es gruesst
itmaster :wink:
[tom]
Posts: 656
Joined: 2003-01-08 20:10
Location: Berlin
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by [tom] »

Was ist denn genau Dein Problem? Also was erwartest Du, und was passiert stattdessen? Wie sieht Deine Config aus? Am besten nicht mit diesen @!~¿% verschleierten Namen.

In dem obigen Beispiel ist es klar, dass domain1.tld auf den ersten geht - ist ja auch so konfiguriert.

[TOM]
itmaster
Posts: 4
Joined: 2002-08-28 19:55
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by itmaster »

Sorry, dachte es wäre klar worum es geht... steht ja weiter oben ;-)

Also:
ich möchte ganz simpel ein web nicht nur mit http://www.domain.tld, sondern auch mit domain.tld ansprechen können. Das hab ich schon 100mal gemacht hier steh ich aber auf dem Schlauch, da mir scheinbar das Confixx dazwischen funkt.

Für eine meiner Domains funktioniert das auch, für eine 2. I(eigentlich die erste meines 1&1-Paketes) gehts aber nicht.

Alle Tipps die ich hier gefunden habe ... hosts usw. bin ich durchgegangen. Nichts von alle dem hat geholfen.
Ping auf domain.tld funkt auch...

Es geht erst seit dem connfix läuft nicht mehr !

Die Konf zu posten erspare ich mir, da trivial und nichts abweichend vom Standard auf dem Server eingerichtet ist.

Was ich brauche ist ne Idee wo man noch suchen könnte.

Der oben genannte work around mit dem nach unten schieben der Sperrkonf ist zwar nett, aber nicht gerade "sauber"...

Danke
Gruß
itmaster
Matthias Diehl
Posts: 315
Joined: 2002-09-24 13:26
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by Matthias Diehl »

Schau mal in Confixx unter TOOLS und dann Domains, ob das Teil denn auch angelegt ist
itmaster
Posts: 4
Joined: 2002-08-28 19:55
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by itmaster »

Matthias Diehl wrote:Schau mal in Confixx unter TOOLS und dann Domains, ob das Teil denn auch angelegt ist
domains sind da... so einfach is es leider net :roll:

wie gesagt ich hab' mir schon den wolf gesucht.
es sieht alles absolut ok aus, aber es läuft nunmal nicht. :(

domain.tld läuft immer ins "sperrweb", eben als ob der alias gar nicht da wäre...

danke
gruss
itmaster
Matthias Diehl
Posts: 315
Joined: 2002-09-24 13:26
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by Matthias Diehl »

Das meinte ich ja oben. Gibt es die Domains http://www.domain.tld UND domain.tld im Confixx unter Tools/Domains ? Oder steht da nur http://www.domain.tld ?
itmaster
Posts: 4
Joined: 2002-08-28 19:55
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by itmaster »

Matthias Diehl wrote:Das meinte ich ja oben. Gibt es die Domains http://www.domain.tld UND domain.tld im Confixx unter Tools/Domains ? Oder steht da nur http://www.domain.tld ?
es gibt beide und sie sind nicht als gesperrt markiert.
zumindest habe ich keinen marker entdeckt.

doch jetzt kommt es: sascha ich danke dir... habe den tipp befolgt und es geht. :lol:

murphy... genau diese faq hatte ich noch nicht gecheckt... :?

doch warum um himmels willen liegt es daran ?
was hat ein hosteintrag a la p12345678.pureserver.info mit dem funktionieren einer domain.tld zu tun ...

wie gesagt mit einer anderen domain auf dem gleichen server (domain2.tld) habe ich diese probleme nicht....

danke
gruß
itmaster
majortermi
Userprojekt
Userprojekt
Posts: 916
Joined: 2002-06-17 16:09
 

Re: Subdomain Problem: www.domain.tld geht domain.tld nicht?!

Post by majortermi »

Vielleicht ist das hier die Antwort auf deine Frage:
http://server.1und1.com/root_server/bugfx/9.html
Erst nachlesen, dann nachdenken, dann nachfragen... :)
Warum man sich an diese Reihenfolge halten sollte...
Post Reply