站点配置了 https,然后百度抓取时候经常出现“抓取异常信息: socket 读写错误”,然后多抓取几次又成功,过段时间又复现,但是 http 并没有出错,所以怀疑是不是 ssl 配置出错,有人说 gzip 影响关闭了也无解,麻烦各位大佬指点一些,谢谢。 环境是军哥的 lnmp,证书使用的是阿里云申请的免费 Symantec 免费版,下面是配置文件信息
listen 443 ssl http2;
server_name test.com;
index index.html index.htm index.php default.html default.htm default.php;
root /test;
ssl_certificate /usr/local/nginx/conf/cert/test.pem;
ssl_certificate_key /usr/local/nginx/conf/cert/test.key;
ssl_session_timeout 60m;
ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1 TLSv1;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
ssl_session_cache builtin:1000 shared:SSL:10m;
include re/test_re.conf;
error_page 404 /404.htm;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log off;
1
baiduyixia OP 重新贴一下配置不知道为什么自动分了
listen 443 ssl http2; server_name test.com; index index.html index.htm index.php default.html default.htm default.php; root /test; ssl_certificate /usr/local/nginx/conf/cert/test.pem; ssl_certificate_key /usr/local/nginx/conf/cert/test.key; ssl_session_timeout 60m; ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1 TLSv1; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_prefer_server_ciphers on; ssl_session_cache builtin:1000 shared:SSL:10m; include re/test_re.conf; error_page 404 /404.htm; include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /.well-known { allow all; } location ~ /\. { deny all; } access_log off; |
2
baiduyixia OP =.= 有大佬帮忙看一下吗
|