Apache VHosts

Status
Niet open voor verdere reacties.

acid007

Gebruiker
Lid geworden
13 jun 2002
Berichten
775
Hallo

Ik ben bezig met Apache, en heb nu DNS adressen aangevraagt bij dyndns.org. Deze adressen werken perfect, ook voor mail e.d.

Ik wil nu als ik ga via dns1.blabla.org dat ik een andere site krijg dan als ik via dns2.blabla.org ga. Hoe kan ik dat realiseren? Ik heb het geprobeerd met 2 virt. hosts maar dat bleek niet te werken?



Bedankt
 
PHP:
NameVirtualHost 213.xxx.xxx.xxx

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin [email]webmaster@dummy-host.example.com[/email]
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost bla.dyndns.com>
    ServerAdmin [email]you@domain.com[/email]
    DocumentRoot /path/to/web/dir
    ServerName bla.dyndns.com
</VirtualHost>

dit zou moeten werken,
 
Laatst bewerkt:
dat dacht ik dus ook. maar hij pakt automatische de eerste en gebruikt die voor alle Vhosts.
 
Check je listen IP and bindaddres dat je die gedefinieerd hebt.

als voorbeeld

BindAddress *


Dan zou je VirtualHost * zijn ipv blah.dyndns.org
 
PHP:
NameVirtualHost 62.xxx.xxx.xxx

<VirtualHost xxx.homelinux.com>
    ServerAdmin [email]root@xxx.homelinux.com[/email]
    DocumentRoot /var/www/html/dns1
    ServerName xxxx.homelinux.com
</VirtualHost>
als ik nu naar het GOEDE adres ga, kom ik deze map (klopt dus).

Maar ga ik naar 192.168.x.x (intern) adres, kom ik op de zelfde plek terecht. Wat dus niet de bedoeling is.
 
Laatst bewerkt:
Na het opnieuw installeren van apache werkte alles. Bedankt voor de hulp!
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan