【发布时间】:2020-10-01 04:31:11
【问题描述】:
我是nginx 的新手,最近我决定更改配置文件,使用返回语句return 301 https://$host$request_uri; 将我的应用程序从http 重定向到https。这一切都很好,直到我注意到我们没有通过Twilio API 收到短信。我决定调试这个问题,发现我收到了SSL/TLS Handshake Error。
查看调试器,我看到他们认为这是问题的可能原因:
Incompatible cipher suites in use by the client and the server. This would require the client to use (or enable) a cipher suite that is supported by the server.
查看nginx 配置文件,我注意到没有使用密码,这可能是问题的根源,而不是因为查看下面的配置未启用 TLS:
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name localhost;
ssl_certificate "/etc/nginx/ssl/domain-crt.txt";
ssl_certificate_key "/etc/nginx/ssl/domain-key.txt";
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
## More configuration below this...
}
Twilio 有一个受支持的密码列表,可以在here 找到,但我不确定如何在我的配置文件中执行此操作。因为我的协议包括TLSv1, TLSv1.1, and TLS1.2,我应该使用所有这些吗?还是我只使用列表中的一个。我真的很困惑我需要在我的 ssl_ciphers 变量中设置什么。
我还读到在ssl_protocols 中启用SSLv3 是个坏主意。我可以从ssl_protocols 中删除它并保存配置而不引起重大问题吗?
如果有人能帮我回答这些问题,那将非常有帮助。谢谢!
【问题讨论】:
标签: nginx twilio nginx-config