Now you have installed the Apache server in your local system /remote system ,if you want to change the default home directory of the server to some specified directory in your machine .Just find the httpd.conf file normally if you installed apache in windows it will be in C:\Program Files\Apache Group\Apache2\conf\httpd.conf file. This is Apache's configuration file, which is very tough for beginners .So better don't worry about that just do the following steps.

In this httpd.conf file, comment out the line that starts with DocumentRoot and add another with your directory, like this:

#DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs";
DocumentRoot "C:/MYSITE/www"

Then, comment out the line that starts with <Directory "C:/Program... and add another with your directory, like this:

#<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
<Directory "C:/Gina/My Music">
Last, about 20 lines below that <Directory line, there is a line that reads:

AllowOverride None

Change it to:
AllowOverride All

When you're done, save httpd.conf. Then, click on the Apache icon in your taskbar and choose "Restart." If Apache restarts successfully [6], you edited your the file correctly. Visit http://servername/ in your web browser. This time you should see a listing of files from the directory C:/MYSITE/www.

Related Posts :



Bookmark and Share