Hello
I have a webserver (XAMPP) for hosting websites.
Trough virtual hosts I have added the websites on the server.
##
## Virtual Host for SITE1.NL
##
ServerName site1.nl
ServerAlias www.site1.nl
ServerAdmin
DocumentRoot "C:Program Files\xampp\htdocs\site1"
ServerPath "C:Program Files\xampp\htdocs\site1"
ErrorLog logs/www.site1.nl-error_log
CustomLog logs/www.site1.nl-access_log common
##
## End Virtual Host for SITE1.NL
##
##
## Virtual Host for SITE2.NL
##
ServerName site2.nl
ServerAlias www.site2.nl
ServerAdmin
DocumentRoot "C:Program Files\xampp\htdocs\site2"
ServerPath "C:Program Files\xampp\htdocs\site2"
ErrorLog logs/www.site2.nl-error_log
CustomLog logs/www.site2.nl-access_log common
##
## End Virtual Host for SITE2.NL
##
I also modified the hostfile of windows:
127.0.0.1 localhost
127.0.0.1 www.site1.nl
127.0.0.1 www.site2.nl
The problem is that when I call www.site1.nl or www.site2.nl, i get the same webpage.
(index.html in the map htdocs/site1).
I should get
for www.site1.nl
index.html in the map htdocs/site1
and for www.site2.nl
index.html in the map htdocs/site2
What can be a solusion?
Piros