TechTalkz.com Logo Ask the Expert

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > PHP

Notices

Re: security question: includes outside doc root

PHP


Reply
 
Thread Tools Display Modes
Old 05-09-2007, 10:30 AM   #1
J.O. Aho
Guest
 
Posts: n/a
Re: security question: includes outside doc root

Pugi! wrote:
> I read that from a security point of view includes (containing php
> code) should be located outside document root.
> On an LAMP server, where do you place those includes ?
> My document root is /var/www/html (/var/www/html/site1, /var/www/html/
> site2, ...). Is for example /var/www/phpincludes/ good enough for
> security reasons ?


Your document root(s) you find in your apache settings, easy way to check
those is just do a grep for DocumnetRoot on those configuration files you have
for you sites.

Your document root seem to be /var/www/html/site1 for site1, so for that one
you can place files in /var/www/html/ and you will be outside the sites root
directory.
Your document root seem to be /var/www/html/site2 for site2, so for that one
you can place files in /var/www/html/ and you will be outside the sites root
directory.
If you have a default server running which has /var/www/html as document root,
then change that as fast as possible, as this can lead to security overrides,
create a new document root for it, example /var/www/html/default and move all
files there that hasn't anything to do with your other sites.

The answer to your question is that /var/www/phpincludes/ is outside your
document roots.


--

//Aho
  Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: security question: includes outside doc root C. PHP 0 05-09-2007 10:30 AM
Question about failed root CA and EFS Graham Windows Security 0 28-08-2007 11:28 AM
Question about failed root CA and EFS Graham Windows Security 0 28-08-2007 11:27 AM
Empty Root (Security) Bryan Erwin Windows Server 2003 1 28-08-2007 04:45 AM
Empty Root (Security) Bryan Erwin Windows Server 2003 1 28-08-2007 04:44 AM


< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 09:38 PM.


vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2010, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional