我最近在我的VPS上安装了Nginx(已编译)+ PHP7-fpm + MariaDB! 我在我的所有nginx / log文件中看到了这个错误:
2017/11/17 17:45:15 [error] 23573#23573: *7 FastCGI sent in stderr: "PHP message: verify error, responseINVALID" while reading response header from upstream, client: 151.xxx.xxx.xxx, server: example.com, request: "GET /wp-admin/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-example.sock:", host: "www.example.com", referrer: "https://www.example.com/wp-admin/index.php"
2017/11/17 17:45:18 [error] 23573#23573: *13 FastCGI sent in stderr: "PHP message: verify error, responseINVALID" while reading response header from upstream, client: 151.xxx.xxx.xxx, server: example.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-example.sock:", host: "www.example.com", referrer: "https://www.example.com/wp-admin/index.php"
2017/11/17 17:46:18 [error] 23573#23573: *23 FastCGI sent in stderr: "PHP message: verify error, responseINVALID" while reading response header from upstream, client: 151.xxx.xxx.xxx, server: example.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-example.sock:", host: "www.example.com", referrer: "https://www.example.com/wp-admin/index.php"
我的网站,看起来工作正常,但我在日志文件上看到此消息。 这个错误是重要的,还是我错误地将配置文件弄错了? 这是我的虚拟主机文件的nginx配置:
upstream backend-example {server unix:/var/run/php/php7.1-example.sock;}
server {
listen 80;
server_name example.com www.example.com;
root /var/www/example/www;
access_log off;
error_log /var/log/nginx/example-error.log;
index index.php index.html;
rewrite_log on;
if ($host != 'www.example.com' ) {
rewrite ^/(.*)$ http://www.example.com/$1 permanent;
}
location ~* ^/core/ {
deny all;
}
location / {
try_files $uri $uri/ @rewrite;
}
location /index.html {
rewrite / / permanent;
}
location ~ ^/(.*?)/index\.html$ {
rewrite ^/(.*?)/ // permanent;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass backend-example;
}
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
break;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
location ~* wp-config.php {
deny all;
}
location ~ /\.ht {
deny all;
}
###
# Pagespeed Settings
###
location ~ '\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+' { add_header '' ''; }
location ~ '^/ngx_pagespeed_static/' { }
location ~ '^/ngx_pagespeed_beacon' { }
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# Redirect non-https traffic to https
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
P.S我的所有网站运行良好,只有这个错误在日志文件上出现!