VPS侦探论坛

 找回密码
 注册
查看: 5052|回复: 1

[Apache] auto_prepend_file 多个站点就出问题了

[复制链接]
发表于 2015-3-18 10:03:23 | 显示全部楼层 |阅读模式

php.ini 这样设置
  1. auto_prepend_file="/mnt/wwwroot/a.com/safe.php"
  2. [HOST=a.com]
  3. open_basedir=/mnt/wwwroot/a.com/:/tmp/
  4. [PATH=/mnt/wwwroot/a.com]
  5. open_basedir=/mnt/wwwroot/a.com/:/tmp/
  6. [HOST=b.com]
  7. open_basedir=/mnt/wwwroot/b.com/:/tmp/
  8. [PATH=/mnt/wwwroot/b.com]
  9. open_basedir=/mnt/wwwroot/b.com/:/tmp/
复制代码



站点目录
a.com  对应/mnt/wwwroot/a.com
b.com  对应/mnt/wwwroot/b.com
然后在a.com 下面php都能正常访问
可是b.com 下面就的php 都不能访问,500错误,是不是 这样算跨站,就不能访问了



美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-3-18 14:03:57 | 显示全部楼层


openbasedir会限制跨目录
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-9 08:29 , Processed in 0.025437 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表