打开站点报错500的原因 有很多,这里只说明一点:nginx 的fastcgi.conf配置引起的问题

 

环境说明

1 站点目录结构

wwwroot

  website

    public

    application

    ……

 

2 nginx 站点配置

server
{
listen 80;
server_name test.aa.com 
index index.html index.htm index.php default.html default.htm default.php;
root /data/wwwroot/website/public;

…………

 

------------------------------------------------------------------------------------------------------------------------------------------------------

需要修改的文件   nginx/conf/fastcgi.conf

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/data/wwwroot/";

注意:增加红色部分

 

原因是:默认的$document_root 只有 对public目录的访问权限,超出这个目录就是没有权限了。比如application目录。

 

相关文章:

  • 2021-06-03
  • 2021-10-14
  • 2021-08-28
  • 2022-01-10
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2021-12-19
  • 2021-04-09
  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案