【问题标题】:Change Nginx port from 80将 Nginx 端口从 80 更改为
【发布时间】:2014-09-19 20:54:43
【问题描述】:

我正在尝试将Nginx 使用的端口从端口80 更改为5555

我已经进入nano /etc/nginx/sites-enabled/default 并编辑:

server {
         listen 5555;
}

但是当我尝试重新启动时,我得到:

$ service nginx restart
Restarting nginx: nginx.
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

我错过了什么吗?

【问题讨论】:

    标签: nginx


    【解决方案1】:

    另一个服务是端口。 使用sudo netstat -plnt查看哪个服务正在使用该端口并停止它,或者进行其他配置。

    还可以查看thisthis

    【讨论】:

      猜你喜欢
      • 2022-11-16
      • 1970-01-01
      • 1970-01-01
      • 2017-02-11
      • 2015-02-14
      • 2015-10-16
      • 2017-03-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多