php定义host防止跨站执行
官方文档 http://www.php.net/manual/zh/ini.sections.php该功可以定义php站点 并限制php运行目录或者说路径 大概意思就是防止跨目录
昨发布的Debian nginx php mysql一键包已应用 该功能
大概操作方法
在php.ini内添加
rootkong.com]
open_basedir ="/网站目录/"
假设网站目录/home/rootkong.com写法open_basedir ="/home/rootkong.com"
www.rootkong.com]
open_basedir ="/网站目录/"
假设网站目录/home/rootkong.com写法open_basedir ="/home/rootkong.com"
如果想要该域名允许获取内存 cpu等信息 可以添加/proc/目录
例
open_basedir ="/网站目录/:/proc/"
允许phpmyadmin运行 添加/tmp/ 方法与以上例子相同
没有特殊需求 越少越安全?
页:
[1]