Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where is Documentroot?

Status
Not open for further replies.

ThinkGeekness

Technical User
Jan 20, 2003
55
US
I have Apache 1.3.26 on RH Linux 7.3 and I am wondering where the documentroot file is. I have a book that says:
Apache looks for the traditional acess.conf and srm.conf files each time it loads, even though it runs without these files and wont generate an error if it does not find them. This creates a potential security hole. To eliminate the possibility of someone writing these files into the location where Apache looks for them, you can disable Apache from performing this search. Apache provides two legacy directives, designed to specify the locations of these once-necessary files, which you can use to indicate /dev/null as the location for both files:
AcessConfig /dev/null
ResourceConfig /dev/null
I have heard that you put it in the documentroot file, but I dont know where that is. Also, is that the right place to put AcessConfig /dev/null
ResourceConfig /dev/null?

Thanks for your help,
Justin
 
Back in the olden days, apache used to use those files but now everything that was in those files is now in httpd.conf. On RH 7.3, the path to it is /etc/httpd/conf/httpd.conf. This is the file that will configure apache. Open this file with a text editor and you will see what looks like pure madness. :) Once you study it for a bit, you will see that it's not all that bad. There's a lot of documentation whithin it. Apache has made a default website for you. It is a test page and it is located in /var/ This is the DocumentRoot. In short all the DocumentRoot is, is the directory where you will be putting you webpages. If you will be hosting more then one domain, then you will use VirtualHosts instead of the one that is defined in httpd.conf's main section. In this case, each vhost will have Its own DocumentRoot defined. You will create a directory for each of them. As for a security issue, I don't think that that is a problem but you can delete those two files if it makes you feel better.
 
Thank you, so
AcessConfig /dev/null
ResourceConfig /dev/null
should be in httpd.conf?

Also, does it matter where I put the commands in httpd.conf file or since it all gets executed it shouldnt matter, right?

Thanks
 
Yes, they would go in httpd.conf. As of version 2.0, those directives are no longer used but you my find that that are already in your httpd.conf. I would guess that they would be near the top. If they are there, just edit them to point to /dev/null. If you can't find them, you can put them where ever you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top