Zweite IP auf www.de umleiten

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

Zweite IP auf www.de umleiten

Postby nontek » 15. November 2005 22:05

Hallo,


ich habe einen Server mit 2 IP Adressen.

Die Erste soll ganz normal auf htdocs schauen, macht sie ja im Moment auch.

Die zweite möchte ich für einen Gameserver verwenden, sie soll allerdings nicht auf htdocs schauen.

Gibt es eine einfache Lösung, wo ich dem Apache sagen kann "wenn Anfrage über zweite IP reinkommt, dann leite sie weiter auf www.domain.de ?"

Ich habe schon ne menge gelesen hier, gibts es nicht eine ganz simple Lösung für mein Problem? Ich möchte den Gameserver einem Freund zur verfügung stellen und beide Contents sollen unabhängig von einander laufen.

Danke

Gruß
Nontek
nontek
 
Posts: 11
Joined: 15. November 2005 21:46
Location: Bad Doberan

Postby Wiedmann » 15. November 2005 22:16

Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby nontek » 15. November 2005 22:23

Wiedmann wrote:http://httpd.apache.org/docs/2.0/mod/core.html#virtualhost



Hallo,

die Antwort kam sehr schnell. Virtualhost war das was ich gelesen habe. OK, wenn es einfacher nicht geht, dann muss ich der Sache wohl oder übel nachgehen :cry:

Danke

Gruß
Matthias
Last edited by nontek on 15. November 2005 22:35, edited 1 time in total.
nontek
 
Posts: 11
Joined: 15. November 2005 21:46
Location: Bad Doberan

Postby nontek » 15. November 2005 22:30

Wiedmann wrote:http://httpd.apache.org/docs/2.0/mod/core.html#virtualhost



Hallo,

hast du eventuell noch einen Link, der die Sache für Otto-Normalverbraucher erklärt :?:


Gruß
Matthias
nontek
 
Posts: 11
Joined: 15. November 2005 21:46
Location: Bad Doberan

Postby nontek » 15. November 2005 23:01

Hallo,

wenn ich jetzt hier die erste IP eingebe, dann dürfte der User bei Eingabe der zweiten doch nicht auf htdocs landen oder? Ich frage lieber nach bevor ich was teste.



# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80




Gruß
Matthias
nontek
 
Posts: 11
Joined: 15. November 2005 21:46
Location: Bad Doberan

Postby BigReval » 17. November 2005 22:17

Hi!

So sieht EIN Virtual Host Eintrag bei mir aus, ich nutze 1 IP:

<VirtualHost *:80>
ServerName www.ceresstraat.nl:80
DocumentRoot /opt/lampp/htdocs
<Directory /opt/lampp/htdocs>
Order Allow,Deny
Allow from all
#Options All
#AllowOverride All
</Directory>
</VirtualHost>

Bei DIR sollte das so aussehen:
====================

NameVirtualHost *:80

<VirtualHost <DEINE IP ADRESSE 1>:80>
ServerName <DEINE DOMAIN 1>:80
DocumentRoot DEIN VERZEICHNIS 1
<Directory DEIN VERZEICHNIS 1>
Order Allow,Deny
Allow from all
#Options All
#AllowOverride All
</Directory>
</VirtualHost>

<VirtualHost <DEINE IP ADRESSE 2>:80>
ServerName <DEINE DOMAIN 2>:80
DocumentRoot DEIN VERZEICHNIS 2
<Directory DEIN VERZEICHNIS 2>
Order Allow,Deny
Allow from all
#Options All
#AllowOverride All
</Directory>
</VirtualHost>

Damit sollte das mit den 2 IP´s klappen!

CU Frank
BigReval
 
Posts: 7
Joined: 28. November 2004 18:22

Postby nontek » 18. November 2005 10:29

Hallo Frank,


ich danke dir :-)


Gruß
Matthias
nontek
 
Posts: 11
Joined: 15. November 2005 21:46
Location: Bad Doberan


Return to Apache

Who is online

Users browsing this forum: No registered users and 20 guests