本地環境是在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, 解決!