WAMP – Configuring Virtual Directory

Written by _AB on 11/08/2012. Posted in PHP, Tricks

I often encounter a situation in which I can not put my web site inside www folder. for novice developers its a tricky job to handle this scenario.
Here I am going to explain that how web developers can configure a virtual directory which is any where on hard disk outside www folder.



Step 1 Create a folder on hard disk, for example “E:/secure-sites/mysitefolder”
Step 2 I assume WAMP is already running and you can see the speedometer icon in notification area. Click on speedometer icon and go to Apache >> Alias Directories >> Add an alias
Here a new command prompt will appear.
Step 3> Enter the site name you want to use, remember to avoid spaces and special characters, you can use – (dash) or _
for example, write, mysite and press enter
Step 4 Now in next line write the path to your desire directory. In my case it is, E:/secure-sites/mysitefolder

Remember to use forward slashes and avoid spaces in directory names as well. Hit Enter and we are done.

Now you can browse your site as url, http://localhost/mysite/

Try it and remember to post feedback.

Good Luck!

Tags: , , ,

Trackback from your site.

_AB

BSCS degree in 2007 from reputable University. Extensive post BS experience in software industry. Self motivated and Enthusiastic about programming. The Language I work in JAVA, SPRING, GWT, GAE, Hadoop, Google MapReduce, JSF, IceFaces, Hibernate, iBatis, HTML, JavaScript and tool are Eclipse 3.2, Netbeans, Dream Weaver. JBOSS and Apache Tomcat, Amazon Web Services. Proficient with GIN/Guice, Requrest Factory and MVP framework. Connect with me on Google+

Comments (2)

  • ejazi
    11/08/2012 at 11:42 pm |

    very helpful thank a lot………

  • Sunny
    11/08/2012 at 11:43 pm |

    i configured virtual directory after reading this article so thanx a lot

Leave a comment

You must be logged in to post a comment.