Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: One of the virtual host goes to default |
|
Author |
|
kalathilayil
Joined: 25 May 2016 Posts: 3 Location: India
|
Posted: Wed 25 May '16 23:17 Post subject: One of the virtual host goes to default |
|
|
I am a newbie in web administration. I am running apache 2.2.17 webserver using WAMP on windows 2008r2. I have 4 websites. But one of the virtual host goes to default, other 3 are working good. I have attached the httpd-vhosts file.
Main,first,socond,forth are working. Third website goes to main. I appreciate you for helping me.
Below is the httpd-vhosts file:
#
# 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 *:80>
DocumentRoot "C:\wamp\www\main"
ServerName main.com
ServerAlias www.main.com
<Directory "C:\wamp\www\main">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:\wamp\www\second"
ServerName second.com
ServerAlias www.second.comsecond.com
<Directory "C:\wamp\www\second">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:\wamp\www\third"
ServerName third.com
ServerAlias www.third.com
<Directory "C:\wamp\www\third">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:\wamp\www\forth"
ServerName forth.com
ServerAlias www.forth.com
<Directory "C:\wamp\www\forth">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Last edited by kalathilayil on Wed 25 May '16 23:51; edited 1 time in total |
|
Back to top |
|
kalathilayil
Joined: 25 May 2016 Posts: 3 Location: India
|
Posted: Wed 25 May '16 23:19 Post subject: |
|
|
I added all server names in hosts file(Windows/system32/drivers/etc/hosts) too. |
|
Back to top |
|
kalathilayil
Joined: 25 May 2016 Posts: 3 Location: India
|
Posted: Thu 26 May '16 23:18 Post subject: |
|
|
Okay, Yesterday I restarted my server. Now it's working fine. |
|
Back to top |
|
|
|
|
|
|