Webserver with several websites

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Webserver with several websites

Postby piros » 05. February 2007 15:36

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
piros
 
Posts: 2
Joined: 05. February 2007 15:21

Postby Wiedmann » 05. February 2007 16:27

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

Postby piros » 05. February 2007 20:44

DONE.

The problem was in the vhost file of Apache

First it was:

## NameVirtualHost *:80

It most be:

NameVirtualHost *:80

stupid stupid stupid :oops: :oops:
piros
 
Posts: 2
Joined: 05. February 2007 15:21

Postby nightrider35 » 12. February 2007 23:42

on xampp it should look like this


Code: Select all
<VirtualHost *:80>
ServerName southcoastsupermotards.no-ip.org:80
DocumentRoot "D:/webserver/xampp/htdocs/southcoastsupermotards.no-ip.org"
<Directory "D:/webserver/xampp/htdocs/southcoastsupermotards.no-ip.org">
Order Allow,Deny
Allow from all
#Options All
#AllowOverride All
</Directory>
</VirtualHost>
nightrider35
 
Posts: 5
Joined: 12. February 2007 23:22


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 57 guests