/etc/nginx/sites-enabled 下有 3 个 vHost:
0-block 2-telegram-bot 3-status
# 0-block
server {
listen 80 default_server;
server_name _;
return 403;
}
# 2-telegram-bot
server {
listen 80;
server_name api.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name api.example.com;
ssl_certificate /etc/nginx/cert/api.cert;
ssl_certificate_key /etc/nginx/cert/api.key;
location / {
proxy_pass https://api.telegram.org;
}
}
# 3-status
server {
listen 80;
server_name status.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name status.example.com;
ssl_certificate /etc/nginx/cert/status.cert;
ssl_certificate_key /etc/nginx/cert/status.key;
location / {
proxy_pass http://127.0.0.1:19999;
}
}
2-telegram-bot 可以正常访问。3-status Safari 下正常,Chrome 提示 ERR_SSL_PROTOCOL_ERROR。
禁用掉 2 后 3 恢复正常,也就是排在最前面的 https 站点是正常的。
Nginx 版本
nginx version: nginx/1.6.2 (Ubuntu) TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module
求教这是什么情况,或给出搜索关键词也行,谢谢!
1
keyfunc 2017-09-16 10:13:21 +08:00
检查 OPENSSL 版本,看看是否支持 SNI
|
3
dndx 2017-09-16 10:38:59 +08:00
用 --with-debug 编译 NGINX,打开 debug 日志,可以看出来握手过程和具体失败原因。
|
4
lslqtz 2017-09-16 11:00:34 +08:00
ERR_SSL_PROTOCOL_ERROR
这是协商错误吧... |
5
KyonLi OP |
6
Loyalsoldier 2017-09-16 11:29:12 +08:00
更新一下 Nginx,这个版本太旧了
|
7
wql 2017-09-16 11:32:36 +08:00 via Android
cipher 问题
|
8
KyonLi OP @Loyalsoldier
通过 nginx 官方预编译包更新到了 1.9.12 ,问题依旧。 @wql 默认配置和 Mozilla SSL Configuration Generator 生成的配置都试过了,还是不行 ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; ssl_protocols TLSv1.2; ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; ssl_prefer_server_ciphers on; |
9
Loyalsoldier 2017-09-18 14:32:33 +08:00
@KyonLi #8 Nginx v1.12 都出来了…… v1.9 都已经废弃了
|
10
KyonLi OP @Loyalsoldier VPS 装的 ubuntu 15.04 ,换系统要掏 10 刀,64M RAM 加上超售严重从源码编译会中途失败,1.9 已经是我能找到的最新的版本了。主要想确认一下是不是我配置的问题,第一次用 Nginx 就这么虐心要有阴影了...
|