Virtual Host, something wrong...

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

Virtual Host, something wrong...

Postby alexw » 23. November 2006 11:48

Hi all,

I have a problem, i have 3 sites that i want on one ip and server.

So i edit httpd-vhosts.conf to this:

Code: Select all
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<VirtualHost *>
ServerName www.as-club.nl
DocumentRoot "C:/Program Files/xampp/htdocs/as-club"
<Directory "C:/Program Files/xampp/htdocs/as-club">
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *>
ServerName www.stichting-nahhd.nl
DocumentRoot "C:/Program Files/xampp/htdocs/Stichting-nahhd"
<Directory "C:/Program Files/xampp/htdocs/Stichting-nahhd">
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *>
ServerName www.your-webhosting.net
DocumentRoot "C:/Program Files/xampp/htdocs/your-webhosting"
<Directory "C:/Program Files/xampp/htdocs/your-webhosting">
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



But all of hose site are going to my main site, as-club.nl
But i want it goint to a own directory bye every sites.

Please help me with this...

Alexw[/code]
alexw
 
Posts: 7
Joined: 21. November 2006 15:53

Postby Izzy » 23. November 2006 12:28

Try this:
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName as-club.nl
ServerAlias www.as-club.nl
ServerAdmin serveradmin@as-club.nl
DocumentRoot "C:/Program Files/xampp/htdocs/as-club"
<Directory "C:/Program Files/xampp/htdocs/as-club">
IndexOptions +FancyIndexing NameWidth=*
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName stichting-nahhd.nl
ServerAlias www.stichting-nahhd.nl
ServerAdmin serveradmin@stichting-nahhd.nl
DocumentRoot "C:/Program Files/xampp/htdocs/Stichting-nahhd"
<Directory "C:/Program Files/xampp/htdocs/Stichting-nahhd">
IndexOptions +FancyIndexing NameWidth=*
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName your-webhosting.net
ServerAlias www.your-webhosting.net
ServerAdmin serveradmin@your-webhosting.net
DocumentRoot "C:/Program Files/xampp/htdocs/your-webhosting"
<Directory "C:/Program Files/xampp/htdocs/your-webhosting">
IndexOptions +FancyIndexing NameWidth=*
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby alexw » 23. November 2006 16:22

Yep, thx!

Alexw
alexw
 
Posts: 7
Joined: 21. November 2006 15:53


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests