Xampp Virtual Host Pointing To Same Folder

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

Xampp Virtual Host Pointing To Same Folder

Postby rajkiran_s » 23. November 2008 12:22

HI

Here is my hosts File


127.0.0.1 www.desi-youtube.com
127.0.0.1 desi-youtube.com
127.0.0.1 www.livedesi4u.com
127.0.0.1 livedesi4u.com

and here is my vsconfig

<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\www.desi-youtube.com"
ServerName www.desi-youtube.com
ServerAlias www.desi-youtube.com

CustomLog "C:\xampp\htdocs\www.desi-youtube.com\www.desi-youtube.com-access_log" combined
ErrorLog "C:\xampp\htdocs\www.desi-youtube.com\www.desi-youtube.com-error_log"

<Directory "C:\xampp\htdocs\www.desi-youtube.com">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\www.livedesi4u.com"
ServerName www.livedesi4u.com
ServerAlias www.livedesi4u.com

CustomLog "C:\xampp\htdocs\www.livedesi4u.com\www.livedesi4u.com-access_log" combined
ErrorLog "C:\xampp\htdocs\www.livedesi4u.com\www.livedesi4u.com-error_log"

<Directory "C:\xampp\htdocs\www.livedesi4u.com">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

When ever i run any domain alway point to first virtual host ,which ever i put on top on file,please help me whats wrong.
thanks
rajkiran_s
 
Posts: 2
Joined: 23. November 2008 12:18

Re: Xampp Virtual Host Pointing To Same Folder

Postby glitzi85 » 23. November 2008 17:09

Replace

Code: Select all
  ServerName www.desi-youtube.com
  ServerAlias www.desi-youtube.com


with

Code: Select all
  ServerName www.desi-youtube.com
  ServerAlias desi-youtube.com


and
Code: Select all
  ServerName www.livedesi4u.com
  ServerAlias www.livedesi4u.com


with

Code: Select all
  ServerName www.livedesi4u.com
  ServerAlias livedesi4u.com


and then you need this before any VirtualHosts-Block:

Code: Select all
NameVirtualHost *:80


glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby rajkiran_s » 23. November 2008 22:22

Hi

Thanks it works but i am still confuse about httpd.conf file there is two location to enter ip address

one is

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 66.90.109.41:80
#Listen 80


other is

# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 66.90.109.41:80


so what i have to put in these locatios as i put my server ip instead of 127.0.0.1

befoer server ip i put 127.0.0.1 then domains only works on server not other location but when i put server orignal ip all domains works on all other location but only one domain not working on webserver
that is livedes4u.com.

can u let me know what reason and what i have to put on above two ip locations.

thanks for ur help.
rajkiran_s
 
Posts: 2
Joined: 23. November 2008 12:18


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 80 guests