problem med virtualhosts
Hej.mit problem, vhosts virker ikke, jeg har læset alt muligt og prøved at følge efter de foskelig eksempler, men uden held.
Jeg har kun 1 ip addresse og vil have mulighed for at have foskelig sub.domains.dk, derfor har jeg tilføjet et CNAME ( sub.domain.dk. )
som peger til domain.dk.
[code]sub IN CNAME @[/code]
/etc/apache2/conf/vhosts/vhosts.conf :
[code]
<VirtualHost domain.dk>
ServerAdmin admin@domain.dk
ServerName domain.dk
ServerAlias www.domain.dk
DocumentRoot /home/httpd/htdocs
</virtualHost>
## sub.domain.dk
<VirtualHost sub.domain.dk>
ServerAdmin sub@domain.dk
ServerName sub.domain.dk
ServerAlias sub
DocumentRoot /home/sub/public_html
</VirtualHost>
[/code]
Det resultere i , at uanset hvilket addresse jeg skriver, http://domain.dk eller http://sub.domain.dk få jeg altid den index side fra domain.dk og sub.domain.dk kan ikke ses.
Jeg har engang haft det exact samme problem da jeg sat apache op i windows, jeg har siden skifted til linux, og hvordan jeg fik det til at virke kan jeg ikke huske.
Håber nogen har talmådighed for at hjælpe.
