Virtual host

Status
Niet open voor verdere reacties.

guidonline

Gebruiker
Lid geworden
7 nov 2007
Berichten
162
Heb 2 domein namen namelijk: www.guidoveenstra.nl en www.gratis-tutorials.com
Nu wil ik deze laten werken via virtual host in het httpd.conf file van apache!

Dit heb ik er staan:
<VirtualHost 89.220.134.99>
ServerAdmin webmaster@guidoveenstra.nl
DocumentRoot /www/site
ServerName www.guidoveenstra.nl
ServerAlias guidoveenstra.nl
</VirtualHost>

<VirtualHost 89.220.134.99>
ServerAdmin webmaster@gratis-tutorials.com
DocumentRoot /www/site3
ServerName www.gratis-tutorials.com
ServerAlias gratis-tutorials.com
</VirtualHost>

Toch kom je bij bijde sites gewoon in de documentroot map terecht..

Wat doe ik fout ik gebruik apache 2.2!

Alvast bedankt....
 
Vervang de DocumentRoot haal de eerste '/' weg uit de padaanduiding, dus probeer:

DocumentRoot www/site

en voor de andere site:

DocumentRoot www/site3


Je zou dan toch echt index.htm of index.html uit de submappen van de ServerRoot moeten versturen naar de browsers die je websites bezoeken.

Zie deze informatie:

This directive sets the directory from which httpd will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document. Example:

DocumentRoot /usr/web

then an access to http://www.my.host.com/index.html refers to /usr/web/index.html.

If the directory-path is not absolute then it is assumed to be relative to the ServerRoot.

Tijs.
 
Status
Niet open voor verdere reacties.

Nieuwste berichten

Terug
Bovenaan Onderaan