繁体   English   中英

使用SSL的Yaws给出错误“ SSL接受失败:超时”

[英]Yaws with SSL gives the error “SSL accept failed: timeout”

我使用certbot为我的网站生成了一个“让我们加密”证书,但是Yaws为我提供了SSL accept failed: timeout尝试连接到它时SSL accept failed: timeout错误(在SSL accept failed: timeout之后)。 有趣的是它的工作原理,当我重定向example.com服务器的本地IP地址的主机在我的机器上的文件,并连接到example.com:8080 ,但是当我连接不example.com不编辑hosts文件,或者当我通过4G从我的手机连接。 这是我的网络服务器的配置文件(这是conf.d唯一的配置文件):

<server www.example.com>
    port = 8080
    listen = 0.0.0.0
    docroot = /usr/share/yaws
    <ssl>
        keyfile = /etc/letsencrypt/live/example.com/privkey.pem
        certfile = /etc/letsencrypt/live/example.com/fullchain.pem
    </ssl>
</server>

我确保密钥文件和证书都可以被yaws用户读取。 密钥文件旁边是一个README ,其中包含以下内容:

`privkey.pem`  : the private key for your certificate.
`fullchain.pem`: the certificate file used in most server software.
`chain.pem`    : used for OCSP stapling in Nginx >=1.3.7.
`cert.pem`     : will break many server configurations, and should not be used
                 without reading further documentation (see link below).
We recommend not moving these files. For more information, see the Certbot
User Guide at https://certbot.eff.org/docs/using.html#where-are-my-certificates.

因此,我比较确定自己使用了正确的文件(其他文件给了我诸如badmatch{tls_alert,"decrypt error"} )。 我还尝试了一些琐碎的事情,例如在URL之前写https:// ,但是它不能解决问题,而且,当服务器在没有SSL的情况下运行时,一切都可以正常工作。 我的服务器上运行的Erlang版本是Erlang / OTP19。此外,如果不清楚,该域实际上不是example.com

同样,如果重要, example.com会通过cname重定向到examplecom.duckdns.org

更新:

当默认的https端口是端口443时,我的服务器正在侦听端口8080 (该端口是从外部端口80转发的)以进行https连接。 我的另一个错误是连接到http://example.com而不是https://example.com 将外部端口443转发到内部端口8443并配置偏航信号以侦听端口8443修复所有问题。

只是为了确保理解,当您执行curl -v https://example.com:8080 ,您会超时,仅此而已? (当然这里必须使用https协议和端口8080

当在SSL虚拟主机上接收到未加密的请求时,可以触发接受期间的SSL超时。

您是否还可以提供以下命令的输出:

echo -e "HEAD / HTTP/1.0\r\n\r\n" | openssl s_client -connect mysite.com:8080 -ign_eof 

最后,您正在运行哪个版本的Yaws? 在哪个操作系统上?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM