virtual directory not working!

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

virtual directory not working!

Postby Yourchild333 » 04. August 2007 22:49

I am new with xampp. its my first time using this.

I'm trying to creating a virtual directory where I can run and test my website locally. I know I can stick my work inside the default virtual directory D:\xampp\htdocs and do my work there but I rather create my own directories.

anyways I opened up httpd-vhosts.conf file in D:\xampp\apache\conf\extra and added a virtual directory like this:


NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
DocumentRoot D:/xampp/htdocs/
ServerName localhost
ServerAdmin admin@localhost
</VirtualHost>



<VirtualHost local.holyghostit.com:80>
DocumentRoot D:/AAWebsiteProjects/holyghostit/
ServerName local.holyghostit
ServerAdmin admin@local.holyghostit.com
<Directory "D:/AAWebsiteProjects/holyghostit/">
Options Indexes FollowSymLinks
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



the part in orange gets added once. no changing done there. the blue part is the default local directory in xampp/htdocs which I am not wanting to use to as my workspace.

the red part is where I am stuck.

my project is located in D:\WebsiteProjects\holyghostit

are my declarations correct in the red part?

Next thing I did was I edited httpd.conf in D:\xampp\apache\conf
I replaced:

#LoadModule rewrite_module modules/mod_rewrite.so

with:
LoadModule rewrite_module modules/mod_rewrite.so


Then finally I edited the hosts file in C:\WINDOWS\system32\drivers\etc\


I added this to the bottom of the file:

127.0.0.1 local.holyghostit.com


So are my configurations correct?

And if I want to browse my website, what do I type into the url?
my computer is named msi

do I type:

msi/holyghostit/index.php?


or:
localhost/holyghostit.com/index.php?


because I've tried different combinations and nothing seems to be working. Can someone help please.

Thanks
Yourchild333
 
Posts: 1
Joined: 04. August 2007 22:07

Postby Wiedmann » 04. August 2007 23:09

and nothing seems to be working.

Why not ... what happens (error.log)?

BTW:
Code: Select all
<VirtualHost local.holyghostit.com:80>

Must be:
Code: Select all
<VirtualHost 127.0.0.1:80>


Code: Select all
ServerName local.holyghostit

Must be:
Code: Select all
ServerName local.holyghostit.com

(see your hosts file)

do I type:
localhost/holyghostit.com/index.php?

You want access a webserver with your webbrowser. So it's:
http://localhost/index.php
or
http://local.holyghostit.com/index.php

--> the URI depends on the vhost you want access. See the "ServerName" in your vhost configuration.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby lyntuan » 05. August 2007 01:12

Why don't you use AMPstart to set domain name?
Let all files in default status, AMPstart will do all for you!
See FAQ
Last edited by lyntuan on 26. December 2008 13:44, edited 1 time in total.
AMPstart :: Launch a Portable Web Server
http://ampstart.com
----------------------------------------------------------
Please read Disclaimer section carefully before downloading
lyntuan
 
Posts: 104
Joined: 08. November 2006 00:21

Postby myharshdesigner » 07. August 2007 04:22

lyntuan wrote:Why don't you use AMPstart to set domain name?
Let all files in default status, AMPstart will do all for you!
See FAQ


what is AMPstart & from where we can download this ?
myharshdesigner
 
Posts: 2
Joined: 07. August 2007 04:15


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 28 guests