phpstudy:upstream sent unsupported FastCGI protocol version: 72 while reading response header from

本文记录了解决在PHPStudy环境下,HTTPS端口443访问出现502错误的过程。通过修改Nginx配置文件中的fastcgi_pass参数,将端口从9001更改为9000,成功解决了问题。

本地环境是在windows上 安装了phpstudy, 今天打开电脑突然访问本地页面, 502!, 好端端的怎么突然就502了呢,什么也没改啊,别的域名都可以正常访问,唯独这个 https的端口为443的报502,

打开错误日志error.log:

2020/04/07 15:57:31 [error] 8352#12920: *1 upstream sent unsupported FastCGI protocol version: 72 while reading response header from upstream, client: 127.0.0.1, server: gitXXX.xcar.com.cn, request: "GET /auto/index.php?r=newxxxr/xxx/index&pserid=8 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "gitxxx.xcar.com.cn"
2020/04/07 15:57:31 [error] 8352#12920: *1 upstream sent unsupported FastCGI protocol version: 72 while reading response header from upstream, client: 127.0.0.1, server: gitnewcar.xcar.com.cn, request: "GET /auo/index.php?r=near/sx/index&pserid=8 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "gitnr.xcar.com.cn"

去网上搜了半天,然后改了一个配置好了;

 location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }

fasctcgi_pass, 由原来的9001,改成了9000, 解决!

 

 

评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值