suphp如何禁用LS /

使用suphp,我为每个虚拟主机设置了一个php.ini文件。 在php.ini中我也设置了:

open_basedir = /home/site1 

PHP脚本运行,但如果我有一个脚本与LS /我可以看到整个根目录。

如何禁用这个孔安全?

 <VirtualHost *:80> ServerName site1 ServerAlias www.site1.com DirectoryIndex index.html index.htm DocumentRoot /home/site1/ suPHP_Engine on AddHandler x-httpd-php .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php # THIS READ php.ini suPHP_ConfigPath /home/site1/ <Directory /home/site1/> Options -Includes -Indexes -FollowSymLinks -ExecCGI -MultiViews AllowOverride none Order allow,deny Allow from all </Directory> </VirtualHost> 

您可以禁用执行外部的二进制文件来摆脱这种行为。

更新你可以这样做,你必须编辑你的php.ini

 disable_functions=exec,passthru,shell_exec, system,proc_open,popen,curl_exec, curl_multi_exec,parse_ini_file,show_source 

(为了清晰,我包括了换行符。)

这是原始url: http : //www.cyberciti.biz/faq/linux-unix-apache-lighttpd-phpini-disable-functions/