need http://project.localhost to be workin

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

need http://project.localhost to be workin

Postby ym_chaitu » 04. February 2010 12:10

Hai
i need some one to write one virtual host in the httpd.conf
this one i have tried it out. but it is not working. Can some one guide it out.. :)
NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
ServerName project.localhost
DocumentRoot "C:\xampp\htdocs\chaitu\support"
DirectoryIndex index.php login.php
<Directory "C:\xampp\htdocs\chaitu\support">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
--
Chaitanya Babu Yanamadala
www.drvirusindia.co.cc
User avatar
ym_chaitu
 
Posts: 33
Joined: 13. November 2009 08:26
Location: Bangalore,India

Re: need http://project.localhost to be workin

Postby LooseCannon » 04. February 2010 16:52

Try something like:
Code: Select all
# line prefix = comments that Apache will ignore

# enable vhost name based addresses
NameVirtualHost *:80

# don't refer to 127.0.0.1, which is your local host and is used by the local XAMPP 'home page'
<VirtualHost *:80>
ServerName project.localhost
# put your web site files here
DocumentRoot "C:/xampp/htdocs/chaitu/support"
DirectoryIndex index.php login.php
<Directory "C:/xampp/htdocs/chaitu/support">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>

# because 'localhost' is used be the XAMPP local 'home page', need to add this in; don't need this if namebased vhosts are not enabled
<VirtualHost *:80>
ServerName localhost
DocumentRoot "c:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Note the forward slashes "/".

Also, add the following line to your hosts file (on XP it's here: C:\WINDOWS\system32\drivers\etc\..)

I'm no expert, so tread with care! :wink:
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: need http://project.localhost to be workin

Postby dadmancpu1 » 04. February 2010 23:22

I have tried this it worksa if I go to localhost only but when I try and go to support.localhost. I can nit get a page to diplay


<VirtualHost *:80>
ServerName localhost
DocumentRoot "c:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName support.localhost
DocumentRoot "C:/xampp/htdocs/helpdesk"
<Directory "C:/xampp/htdocs/helpdesk">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
AllowOverride All
Allow from All
</Directory>
</VirtualHost>

Any ideas
dadmancpu1
 
Posts: 4
Joined: 30. January 2010 21:15

Re: need http://project.localhost to be workin

Postby ym_chaitu » 05. February 2010 06:42

:cry:
@LooseCannon
it is not working i have tried that one..

i am using windows xp sp3,
xampp 1.7.2

can any one else help me out
--
Chaitanya Babu Yanamadala
www.drvirusindia.co.cc
User avatar
ym_chaitu
 
Posts: 33
Joined: 13. November 2009 08:26
Location: Bangalore,India

Re: need http://project.localhost to be workin

Postby LooseCannon » 08. February 2010 10:19

@ym_chaitu - Please give us some details. What happens, when and is anything in the log file(s)? How exactly do you navigate/action the link/website? What steps do you take...?

@dadmancpu1 - Please start your own thread. Having two issues in one thread does m' olde head in and it's generally bad form in forums. :) In that new thread, tell us what happens, when and is anything in the log file(s)? How exactly do you navigate/action the link/website? What steps do you take...?
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: need http://project.localhost to be workin

Postby ym_chaitu » 08. February 2010 10:25

LooseCannon wrote:@ym_chaitu - Please give us some details. What happens, when and is anything in the log file(s)? How exactly do you navigate/action the link/website? What steps do you take...?


it writes nothing in the log files..
i am navigating by typing like this in the browser.
http://project.localhost/

it says as the link is broken in chrome and nothing it shows in IE and in firefox it adds www and navigates to the internet..
--
Chaitanya Babu Yanamadala
www.drvirusindia.co.cc
User avatar
ym_chaitu
 
Posts: 33
Joined: 13. November 2009 08:26
Location: Bangalore,India

Re: need http://project.localhost to be workin

Postby LooseCannon » 08. February 2010 10:44

Ah! I should have asked already...

Have you added the 'test domain' into your host file?

C:\WINDOWS\system32\drivers\etc\

The file is just called "host". No suffix.

Add a line:
127.0.0.1 project.localhost

Then, when you type "http://project.localhost/" in a browser address, the browser looks at your localhost, ie you PC. Otherwise, the browser heads off to the default gateway on your network...
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: need http://project.localhost to be workin

Postby ym_chaitu » 08. February 2010 10:52

already done that by googling it..
but didnt worked..
--
Chaitanya Babu Yanamadala
www.drvirusindia.co.cc
User avatar
ym_chaitu
 
Posts: 33
Joined: 13. November 2009 08:26
Location: Bangalore,India

Re: need http://project.localhost to be workin

Postby LooseCannon » 08. February 2010 11:06

Just back-checking some details in the first. In httpd-vhosts.conf:

NameVirtualHost *:80
(not NameVirtualHost 127.0.0.1)

<VirtualHost *:80>
(not <VirtualHost 127.0.0.1>)

Note: Stop and start Apache when changes made to httpd-vhosts.conf; sorry if this is obvious to you, but better safe and insulted eh?! ;)
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: need http://project.localhost to be workin

Postby ym_chaitu » 08. February 2010 11:47

i have done that but still nope..
--
Chaitanya Babu Yanamadala
www.drvirusindia.co.cc
User avatar
ym_chaitu
 
Posts: 33
Joined: 13. November 2009 08:26
Location: Bangalore,India

Re: need http://project.localhost to be workin

Postby LooseCannon » 08. February 2010 11:59

You do have forward slashes in your vhost file, not backslashes?

The first post shows:
Code: Select all
DocumentRoot "C:\xampp\htdocs\chaitu\support"

Should be:
Code: Select all
DocumentRoot "C:/xampp/htdocs/chaitu/support"
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: need http://project.localhost to be workin

Postby ym_chaitu » 08. February 2010 12:08

i think that was the problem. now it is working fine...
thank you for your help..

now the configuration file is
Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "c:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName ftp.localhost
DocumentRoot "C:/xampp/htdocs/chaitu/ftpfull"
<Directory "C:/xampp/htdocs/chaitu/ftpfull">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
--
Chaitanya Babu Yanamadala
www.drvirusindia.co.cc
User avatar
ym_chaitu
 
Posts: 33
Joined: 13. November 2009 08:26
Location: Bangalore,India


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests