gpt4 book ai didi

ssl - 无法使用 https 访问网站

转载 作者:行者123 更新时间:2023-12-04 22:37:23 25 4
gpt4 key购买 nike

我目前正在使用具有以下配置的 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 请求的记录就像魅力一样。

其他需要注意的事项:

运行 sudo nginx -t返回以下响应:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

运行 sudo ufw status返回以下响应:
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 应用程序正在运行,尝试 curl 到 unix 套接字。如果还是不行,你现在用的是哪个云服务?如果您使用 aws 或 gce,您仍然需要配置他们的防火墙。

关于ssl - 无法使用 https 访问网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60598350/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com