【问题标题】:Nginx Port 443 already in use by it self?Nginx 443 端口已经被它自己使用了?
【发布时间】:2020-12-25 23:27:18
【问题描述】:

我对 Nginx 完全陌生,只是在玩弄我的域,我一直在闲逛,没有使用过。我想我不妨好好利用它并在上面托管 API。不过想先学点Nginx。

当我检查错误日志时,我收到以下错误:

2020/09/07 10:49:54 [emerg] 32432#32432: bind() to 0.0.0.0:443 failed (98: Address already in use)

当我检查“sudo netstat -tulpn”时:

tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      32455/nginx: master
tcp6       0      0 :::443                  :::*                    LISTEN      32455/nginx: master

是 nginx 它自己在使用 443 端口吗?

我的配置只是覆盖了sites-availble中名为“default”的默认nginx conf,如下所示:

server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;

ssl on;
ssl_certificate /home/ubuntu/dotnetdeploy/www_topswagcode_dev.pem;
ssl_certificate_key /home/ubuntu/dotnetdeploy/www_topswagcode_dev.key;

root /var/www/html;

index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
    try_files $uri $uri/ =404;
}
}

有人知道这里发生了什么吗?

【问题讨论】:

    标签: nginx nginx-config


    【解决方案1】:

    默认情况下,Aws Lightsail 仅打开端口 80 和 22。我想狠狠地踢我的坚果....

    【讨论】:

      猜你喜欢
      • 2015-12-20
      • 2020-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-22
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      相关资源
      最近更新 更多