Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 28th June 2012, 02:21
gabbo85 gabbo85 is offline
Junior Member
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How To Set Up Apache2 With mod_fcgid And PHP5 On CentOS

I have read and followed this howto, but I'm pretty confused.
I added the following php script in / var/www/web1/web/test.php and calling it from the browser I can read the contents of the entire server, including the document root of web2.
PHP Code:
$files1 scandir($dir);

Output: Array ( [0] => . [1] => .. [2] => conf [3] => conf.d [4] => logs [5] => modules [6] => run )
How can I limit web1 only to its document root / var/www/web1/web/ ?
Reply With Quote
Sponsored Links
Old 28th June 2012, 16:59
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts

You can set open_basedir to /var/www/web1/web, e.g. with the line

exec /usr/bin/php-cgi -d open_basedir=/var/www/web1/web
in your php-fcgi-starter script.
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 05:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.