Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.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 无法使用https访问站点_Ssl_Nginx - Fatal编程技术网

Ssl 无法使用https访问站点

Ssl 无法使用https访问站点,ssl,nginx,Ssl,Nginx,我目前正在使用nginx为服务器提供以下配置 server { server_name www.skipven.xyz skipven.xyz; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/ubuntu/ari-bot/aribot; } location / { include

我目前正在使用nginx为服务器提供以下配置

server {
    server_name www.skipven.xyz skipven.xyz;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/ubuntu/ari-bot/aribot;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/home/ubuntu/ari-bot/ari-bot.sock;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/skipven.xyz/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/skipven.xyz/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = www.skipven.xyz) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = skipven.xyz) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    server_name www.skipven.xyz skipven.xyz;
    return 404; # managed by Certbot
}
当我尝试访问
http://skipven.xyz
,它已成功重定向到
https://skipven.xyz
。但是
https://skipven.xyz
不返回任何内容。我也找不到https请求的任何访问日志,但http请求像charm一样被记录

其他需要注意的事项:

运行
sudo nginx-t
返回以下响应:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Status: active

To                         Action      From
--                         ------      ----
Nginx Full                 ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
Nginx Full (v6)            ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6) 
运行
sudo ufw status
返回以下响应:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Status: active

To                         Action      From
--                         ------      ----
Nginx Full                 ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
Nginx Full (v6)            ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6) 

首先确保您的web应用程序正在运行,然后尝试使用unix套接字。如果仍然不起作用,您现在使用哪种云服务?如果你使用aws或gce,你仍然需要配置他们的防火墙。

你在错误日志中得到了什么?刚刚意识到我没有更新我的aws防火墙设置,谢谢