分类 应用 下的文章

1.注意事项

服务器web服务必须是nginx,apache暂未做适配,php必须以php-fpm启动,即LNMP才支持,LNAMP和LAMP不支持。

服务器同时安装了php5.6和php7.1,php5.6和php7.1已经同时启动。

2.开始配置

修改nginx配置文件

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

location ~ [^/]\.php(/|$)

    {    

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

        fastcgi_index index.php;

        include fastcgi.conf;

        include pathinfo.conf;

        if ($request_uri ~* "ndot_ladderbuy"){   

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

        }   

    }

  1. 安装vetur(vue) 和 prettier 两个插件
  2. 打开vscode软件,左下角点击设置 》打开设置》唤出快速搜索条界面。
  3. 设定自动保存文件,搜索框贴入files.autoSave筛出设置项,并把设置项属性选择为onFocuschange。
  4. 设定编辑器默认代码格式化(美化)的插件为Prettier,同理在搜索设置框贴入editor.defaultFormatter,将配置项选择为Vetur。
  5. 设定Prettier插件保存时自动格式化代码,搜索设置项贴入editor.formatOnSave,将搜索到的项目打钩即可

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. /