logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Changing default Document Root in httpd.conf (2 places ??)
Author
Mel_3



Joined: 20 Sep 2008
Posts: 7

PostPosted: Sun 21 Sep '08 15:50    Post subject: Changing default Document Root in httpd.conf (2 places ??) Reply with quote

Goal:
I want to change the default Root from...
c:\webdev\apache\conf\htdocs
to
c:\webdev\apache\wwwroot

History:
.. I searched httpd.conf for "htdocs" and found it.
.. commented out the line c:\webdev\apache\conf\htdocs
.. entered the new path c:\webdev\wwwroot
.. no workie !
.. found a 2nd place in httpd.conf with c:\webdev\apache\conf\htdocs
.. commented out the line & entered new as above
.. it worked !

The Questions:
1 - Should I have changed it in both places?
2 - Why is it listed twice?

thanks for any help.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 21 Sep '08 18:13    Post subject: Reply with quote

Yes, change DocumentRoot and not it's corresponding <Directory> and you'll get a 403 Fobidden error.

DocumentRoot "C:/Apache2/htdocs" tells the server where the files for
ServerName are located.

http://httpd.apache.org/docs/2.2/mod/core.html#documentroot


<Directory "/Apache22/htdocs"> has a couple uses one of which is access control.

http://httpd.apache.org/docs/2.2/mod/core.html#directory
Back to top


Reply to topic   Topic: Changing default Document Root in httpd.conf (2 places ??) View previous topic :: View next topic
Post new topic   Forum Index -> Apache