Link to home
Start Free TrialLog in
Avatar of Atouray
Atouray

asked on

Virtual host Configuration

I thought my problem was solved but i am still having the same issue
This is my configuration below

NameVirtualHost 192.168.11.144

<VirtualHost 192.168.11.144>
   DocumentRoot "C:\xampplite\htdocs\gambis"
   ServerName gambis.pstn
</VirtualHost>

<VirtualHost 192.168.11.144>
   DocumentRoot "C:\xampplite\htdocs\cfco"
   ServerName cfco.pstn
</VirtualHost>

in my windows server 2008 DNS server i set up a domain called .pstn and a host called              
   www.gambis.pstn
   www.cfco.pstn
and map them to 192.168.11.144
but when i type www.gambis.pstn in my browser or www.cfco.pstn in the browser I got only the page for www.gambis.pstn

Please help me!!!
Avatar of themrrobert
themrrobert
Flag of United States of America image

Did you restart your web server?

Try

NameVirtualHost 192.168.11.144

<VirtualHost 192.168.11.144>
   ServerAdmin admin@gambis.pstn
   DocumentRoot C:/xampplite/htdocs/gambis
   ServerName gambis.pstn
</VirtualHost>

<VirtualHost 192.168.11.144>
   ServerAdmin admin@cfco.pstn
   DocumentRoot C:/xampplite/htdocs/cfco
   ServerName cfco.pstn
</VirtualHost>

Open in new window

Another thing, I've noticed that sometimes web servers are sensitive with host-name based virtual hosts while using ip addresses, so maybe try:



NameVirtualHost *

<VirtualHost *>
ServerAdmin admin@gambis.pstn
DocumentRoot C:/xampplite/htdocs/gambis
ServerName gambis.pstn
</VirtualHost>

<VirtualHost *>
ServerAdmin admin@cfco.pstn
DocumentRoot C:/xampplite/htdocs/cfco
ServerName cfco.pstn
</VirtualHost>

Open in new window

dont forget you HAVE to restart your web server or these changes wont take effect
Avatar of Atouray
Atouray

ASKER

if i type www.gambis.pstn or www.cfco.pstn it goes the same page i.e. www.gambis.pstn This is not working for me any other suggesting.
1) props to above. restarting Apache is the 1st thing to check
2) The original code is correct. If you are going to the same page, your code probably isn't getting picked up.

Check for httpd.conf syntax above your code, which might force the dedicated IP to resolve to C:\xampplite\htdocs\gambis. For example, if you have NameVirtualHost *:80 or _default_ above the code, your code will be useless.

And, of course, verify that the file you are editing, is included within the Include of httpd.conf.
ASKER CERTIFIED SOLUTION
Avatar of arober11
arober11
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial