Page 1 of 1

virtual directory not working!

PostPosted: 04. August 2007 22:49
by Yourchild333
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

PostPosted: 04. August 2007 23:09
by Wiedmann
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.

PostPosted: 05. August 2007 01:12
by lyntuan
Why don't you use AMPstart to set domain name?
Let all files in default status, AMPstart will do all for you!
See FAQ

PostPosted: 07. August 2007 04:22
by myharshdesigner
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 ?