Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssl nginx-https连接不';行不通_Ssl_Nginx_Https_Lets Encrypt_Certbot - Fatal编程技术网

Ssl nginx-https连接不';行不通

Ssl nginx-https连接不';行不通,ssl,nginx,https,lets-encrypt,certbot,Ssl,Nginx,Https,Lets Encrypt,Certbot,我有一个使用nginx(+certbot)生成ssl证书的服务器,当我尝试使用http访问我的站点时,它工作正常,但当我尝试使用https访问它时,它不工作,我在brwser中收到消息此站点无法访问 nginx配置: ... listen 443 ssl http2; ssl on; ssl_certificate /path/to/my/cert; ssl_certificate_key /path/to/my/cert_key; ... 此外,我还检查了443端口是否打开,似乎正常: su

我有一个使用nginx(+certbot)生成ssl证书的服务器,当我尝试使用http访问我的站点时,它工作正常,但当我尝试使用https访问它时,它不工作,我在brwser中收到消息
此站点无法访问

nginx配置:

...
listen 443 ssl http2;
ssl on;
ssl_certificate /path/to/my/cert;
ssl_certificate_key /path/to/my/cert_key;
...
此外,我还检查了443端口是否打开,似乎正常:

sudo netstat -peanut | grep ":443 "

tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      0          67057870   10224/nginx: master
我还检查了iptables规则,似乎也可以:

-A IN_public_allow -p tcp -m tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT`
知道有什么问题吗


谢谢

我遇到了同样的问题:创建并验证了常用的SSL证书,设置了NginX,并且运行良好,但HTTPS不起作用:(