lnmp 安装 fastamin 报内部500错误和404错误

lnmp 安装 fastamin 报内部500错误和404错误

 

lnmp 安装好后

500错误,

open_basedir 的原因
vi /usr/local/nginx/conf/fastcgi.conf

修改为下面行
#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/wwwroot/default/:/tmp/:/proc/";

404 错误. zZsBYJNtfE.php 修改为自己的随机页面

location ^~ /zZsBYJNtfE.php/ {
                if (!-e $request_filename){
                        rewrite  ^\/zZsBYJNtfE\.php(.*)$  /zZsBYJNtfE.php?s=$1 last;   break;
                }
        }

        location / {
                if (!-e $request_filename) {
                        rewrite  ^(.*)$  /index.php?s=/$1  last;
                        break;
                }
        }

404 报错 也可以直接改nginx.conf

#include enable-php.conf;或者,你直接注释掉这一行,在下面添加新的一行
include enable-php-pathinfo.conf;

 

 

参考:

https://www.cnblogs.com/gaogaoxingxing/p/11706854.html

https://www.cnblogs.com/gaogaoxingxing/p/11706851.html

https://www.cnblogs.com/zhangyouwu/p/17863465.html

posted on 2025-04-24 11:41  少杨  阅读(7)  评论(0)    收藏  举报