apache Virtual host problem....

Apache, Lighttpd, nginx, Cherokee
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

apache Virtual host problem....

Post by goelliboy »

Hi

ich habe inen problem ich habe 2 virtual host so angelegt...

Code: Select all

<VirtualHost *>
	ServerName ice-devils.de
	DocumentRoot /srv/www/htdocs/ice
</VirtualHost>

<VirtualHost *>
	ServerName korrekterfun.de
	DocumentRoot /srv/www/htdocs/korrekterfun
</VirtualHost>

so http://www.ive-devils.de geht ja

aber wenn ich http://www.korrekterfun.de eingeben geht der auch in den ordner von ice-devils.....

was mache ich da falsch?

ps
und wenn ich apache starte kommt folgende fehlermeldung:

Starting httpd [ ][Sat Aug 30 14:16:28 2003] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
mcdoogle
Posts: 178
Joined: 2003-07-15 13:36
 

Re: apache Virtual host problem....

Post by mcdoogle »

So sollte es eigentlich funktionieren. Versuch doch mal statt der Sternchen Deine IP:Port zu verwenden. So hab ich es.
Mit dem sternchen hatte ich auch am Anfang einige Probleme. Aber an anderer Stelle!
Mehr kann ich leider auch net dazu sagen!

So schaut es bei mir aus und es funktioniert.
Der erste virtuelle Host fängt alle subdomains auf die unten nicht weiter definiert werden (default sozusagen)

Code: Select all

<VirtualHost 217.160.216.228:80>
        DocumentRoot /data/www/gesperrt
</VirtualHost>

<VirtualHost 217.160.216.228:80>
        ServerName f-eckert.de
        ServerAlias  www.f-eckert.de
        DocumentRoot /data/www/florian
</VirtualHost>

<VirtualHost 217.160.216.228:80>
        ServerName mysql.f-eckert.de
        DocumentRoot /data/www/florian/phpMyAdmin
</VirtualHost>
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

ne das geht auch nciht wenn ich das mache kommt folgende fehlermeldung:

Starting httpd [ ][Sat Aug 30 15:48:15 2003] [warn] VirtualHost 213.239.194.233:80 overlaps with VirtualHost 213.239.194.233:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Sat Aug 30 15:48:15 2003] [warn] VirtualHost 213.239.194.233:80 overlaps with VirtualHost 213.239.194.233:80, the first has precedence, perhaps you need a NameVirtualHost directive
[nix]pepe
Userprojekt
Userprojekt
Posts: 244
Joined: 2003-04-08 19:36
 

Re: apache Virtual host problem....

Post by [nix]pepe »

NameVirtualHost 217.160.216.228:80
noch davor bitte
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

wie da vor

ich bin zu dumm...
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: apache Virtual host problem....

Post by darkspirit »

Vor den VirtualHost-Direktiven in den globalen Teil der httpd.conf.
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

geht ned.....

oder muss ich da noch was in apache so einstellen, weil eignetlich noch alles standart is
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

also es kommt zu keiner fehlermeldung mehr, aber der effekt ist immer noch da, das alles du der ersten domain geleitet wird:

Code: Select all

NameVirtualHost 213.239.194.233:80

<VirtualHost 213.239.194.233:80>
	ServerName ice-devils.de
	DocumentRoot /srv/www/htdocs/ice
</VirtualHost>

<VirtualHost 213.239.194.233:80>
	ServerName korrekterfun.de
	DocumentRoot /srv/www/htdocs/korrekterfun
</VirtualHost>
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: apache Virtual host problem....

Post by darkspirit »

Gib mal noch jeweils einen Serveralias an.. für ice-devils.de mach noch eine Zeile "ServerAlias http://www.ice-devils.de" rein. Das gleiche beim zweiten VirtualHost..
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

ey krass, danke es funzt :)
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: apache Virtual host problem....

Post by darkspirit »

Deine zweite Addy war übrigens schon vorher erreichbar.. allerdings nur über http://korrekterfun.de ;)
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

kannst du mir noch sagen wir man ne subdomain macht und die ein einem anderen ordner geht:
zb zu:
DocumentRoot /srv/www/htdocs/test
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: apache Virtual host problem....

Post by darkspirit »

Zum Bleistift so:

Code: Select all

<VirtualHost 213.239.194.233:80>
   ServerName subdomain.ice-devils.de
   ServerAlias www.subdomain.ice-devils.de
   DocumentRoot /srv/www/htdocs/test
</VirtualHost> 
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

schaxde funzt ned so wirklich...

<VirtualHost 213.239.194.233:80>
ServerName miguellito.korrekterfun.de
ServerAlias http://www.miguellito.korrekterfun.de
DocumentRoot /srv/www/htdocs/miguellito
</VirtualHost>
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: apache Virtual host problem....

Post by darkspirit »

Haste den Apache auch neugestartet bzw. reloaded?
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

jo habei ch mit dfem befehl inner shell

rcapache restart
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

ja mit dem befehl_ rcapache restart
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: apache Virtual host problem....

Post by darkspirit »

Was sagt das error_log?
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

nix ungewöhnliches

oder muss man vorher nich irgendwie was machen
wgot
Posts: 1675
Joined: 2003-07-06 02:03
 

Re: apache Virtual host problem....

Post by wgot »

Hallo,

was zeigt der Browser an, wenn Du die Subdomain aufrufst?

Hast Du im Nameserver Wildcard-Subdomains?

Wenn ich http://www.miguellito.korrekterfun.de/ kommt "Server kann nicht gefunden werden".

Sieht so aus, als ob der NS-Eintrag fehlt.

Gruß, Wolfgang
goelliboy
Posts: 19
Joined: 2003-08-24 16:35
 

Re: apache Virtual host problem....

Post by goelliboy »

jo dasstimmt der fehlt wie muss ich das amchen im nameserver was muss ich da noch einfügen?
wgot
Posts: 1675
Joined: 2003-07-06 02:03
 

Re: apache Virtual host problem....

Post by wgot »

Hallo,

Code: Select all

*		IN A	217.160.xxx.xxx
für alle Subdomains (die nicht definierten landen dann auf dem DefaultHost)
oder

Code: Select all

subdomain		IN A	217.160.xxx.xxx
für eine einzelne Subdomain.

Die Serial erhöhen, den NS neu starten und bis morgen Geduld.

Gruß, Wolfgang
keyzar
Posts: 5
Joined: 2003-08-25 07:27
 

Re: apache Virtual host problem....

Post by keyzar »

du vergisst das entsprechende kommando bereit zu stellen:

/usr/sbin/apachectl restart

für debian siehe oben

bei suse tut es auch rcapache restart
(wenn bei suse restart nicht gehen sollte dann
rcapache stop
rcapache start
anwenden)

btw: /usr/sbin kann man nur als user "root" nutzen


PS:
Oh oh ich hab nur die erste seite gelesen......
wgot
Posts: 1675
Joined: 2003-07-06 02:03
 

Re: apache Virtual host problem....

Post by wgot »

hallo,

nö :lol:

er vergißt, sein System anzugeben.

Gruß, Wolfgang
[nix]pepe
Userprojekt
Userprojekt
Posts: 244
Joined: 2003-04-08 19:36
 

Re: apache Virtual host problem....

Post by [nix]pepe »

wenn er rc... benutzt, wird's wohl suse sein odda nit? ;)
Post Reply