How to setup a virtual directory on WAMP
Posted by: gadtone (203.177.100.---)
Date: June 23, 2007 05:03AM

I know in IIS you only need to go to the administrative tools and IIS then create the folder. But how can you create a virtual directory on WAMP. Am I really limited on creating directory on the WWW root directory? or are there any other ways?

Options: ReplyQuote
Re: How to setup a virtual directory on WAMP
Posted by: krusher_00 (---.accessplus.com.au)
Date: June 27, 2007 09:25AM

No, heeeeeaps of other ways..

First of all, have a look at how the virtual hosts for apache work.
[httpd.apache.org] (older documentation but essentially the gist of it)

then try the following.

insure the following line is located at the end of your httpd.conf file

Include "C:/wamp/apache2/conf/extra/httpd-vhosts.conf"

Then goto that file and put in something similar to the code below.
note, this is assuming you have the required folders located under c:/wamp/www/*something*

personally I use c:/wamp/www/docs/domainname.com/
to house the files.

heres an example config:
----------

<VirtualHost *:80>
DocumentRoot C:/wamp/www/docs/domainname.com/
ServerName domainname.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot C:/wamp/www/docs/someotherwebsite.org/
ServerName someotherwebsite.org
</VirtualHost>

-----------
(obviously these can be changed depending on your actual domains.)



Post Edited (06-27-07 09:25)

Options: ReplyQuote
Re: How to setup a virtual directory on WAMP
Posted by: yfastud (72.236.169.---)
Date: June 27, 2007 02:54PM

Make sure to void those dummy example vh or your web server (wamp) would NOT start, and you must have this line before those vh dir in httpd-vhosts.conf

NameVirtualHost *:80

Have fun,

[www.jlbn.net]




Post Edited (06-27-07 14:58)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.