请问一个 ssl 配置的问题

2020-02-13 16:52:49 +08:00
 baiduyixia

站点配置了 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;
652 次点击
所在节点    问与答
2 条回复
baiduyixia
2020-02-13 16:54:05 +08:00
重新贴一下配置不知道为什么自动分了

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;
baiduyixia
2020-02-13 22:30:00 +08:00
=.= 有大佬帮忙看一下吗

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/644334

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX