请问Apache如何配置open_basedir,限定访问只能在站点目录内及指定目录活动

问答中心分类: PHP请问Apache如何配置open_basedir,限定访问只能在站点目录内及指定目录活动
那年花开 asked 5 年 ago

使用 php_admin_value open_basedir /data/wwwroot/domain/:/tmp

 

报错 :Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration

2 Answers
oneinstack answered 5 年 ago
直接网站根目录放.user.ini 跨站规则写入其中,并设置chattr +i .user.ini

那年花开 answered 5 年 ago
感谢