gpt4 book ai didi

ssl - Ubuntu/Nginx SSL 证书不工作

转载 作者:太空宇宙 更新时间:2023-11-03 15:15:17 25 4
gpt4 key购买 nike

我在使用 NGINX/Nodejs 的 ubuntu 服务器上安装 SSL 证书时遇到问题。

在我的/etc/nginx/sites-enable/website 文件上

server {

listen *:443 default_server ssl;
listen 80;

ssl_certificate_key /etc/ssl/myserver.key;
ssl_certificate /etc/sscl/gd_bundle-g2-g1.crt;

server_name XXX.example.io;

root /var/www/example/public/;

client_max_body_size 100M;
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;


error_log /var/log/nginx/example_error.log warn;

try_files $uri @example2;

log_not_found on;

log_subrequest on;

location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 1d;
}

location @example2 {
proxy_pass http://record;
}


}

当我netstat查看443端口是否被监听的时候不是(netstat -antlp)

tcp        0      0 0.0.0.0:22              0.0.0.0:*              LISTEN      1022/sshd       
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 19976/nodejs
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 30164/nodejs
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5656/nginx
.......................

tcp6 0 0 :::22 :::* LISTEN 1022/sshd

关于 NGINX 为什么甚至不监听端口 443 的任何想法?我已经在 AWS 上打开了它。

最佳答案

我已经设法解决了这个问题,一个失踪;像往常一样,感谢您的回复

关于ssl - Ubuntu/Nginx SSL 证书不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32127044/

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