微擎不同应用模块使用不同php版本

应用 · 2022-08-16 · 166 人浏览

1.注意事项

a、服务器web服务必须是nginx,php必须以php-fpm启动。

b、服务器同时安装了php5.6和php7.1。

2.开始配置

修改nginx配置文件

宝塔站点管理点击你想配置的站点,选择配置文件,我们先将33行左右的include enable-php-xx.conf前加#注释掉然后加入如下代码

location ~ 1.php(/|$)

{    

    fastcgi_pass unix:/tmp/php-cgi-71.sock; 

    fastcgi_index index.php;

    include fastcgi.conf;

    include pathinfo.conf;

    if ($request_uri ~* "ndot_blindbox"){   

        fastcgi_pass unix:/tmp/php-cgi-72.sock;    

    }   

}

  1. /
豫ICP备17047052号-1