Skip to content

Instantly share code, notes, and snippets.

@smamran
Created December 20, 2015 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smamran/d67132504ffc74ca33eb to your computer and use it in GitHub Desktop.
Save smamran/d67132504ffc74ca33eb to your computer and use it in GitHub Desktop.
httpd

If you are using XAMPP then open C:\xampp\apache\conf\httpd.conf in your favorite php editor.

OR

If you are using WAMP then open C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf in your favorite php editor. We need to shift "C:\xampp\htdocs" to "D:\projects" so that when we open "http://localhost", then instead of listing projects in "htdocs" folder it will list our projects from "D:\projects" .

Please modify following snippet of code in httpd.conf

Hash(#) shows that line is commented

On line 186

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "C:/xampp/htdocs"
DocumentRoot "D:/projects"

On line 221
#
# This should be changed to whatever you set DocumentRoot to.
#
# < Directory "C:/xampp/htdocs">
< Directory "D:/projects">

Don't forget to re-start your apache server to make changes working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment