Nginx 启动失败 - 我该如何修复该问题?

Nginx start failed - how I can repair that problem?

我有点新手。几个月前我已经开始使用服务器了。一切都很好,但现在在服务器上我什至无法 echo 某些东西。如何修复nginx服务器?

我的 debian

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
root@debian:/home/maly#

和 nginx 版本

nginx version: nginx/1.14.2

这是我的 nginx 状态

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/nginx.service.d
           └─override.conf
   Active: failed (Result: exit-code) since Sat 2021-11-06 19:34:43 CET; 17min ago
     Docs: man:nginx(8)

lis 06 19:34:41 debian nginx[17186]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address al
lis 06 19:34:41 debian nginx[17186]: nginx: [emerg] bind() to [::]:80 failed (98: Address alrea
lis 06 19:34:42 debian nginx[17186]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address al
lis 06 19:34:42 debian nginx[17186]: nginx: [emerg] bind() to [::]:80 failed (98: Address alrea
lis 06 19:34:42 debian nginx[17186]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address al
lis 06 19:34:42 debian nginx[17186]: nginx: [emerg] bind() to [::]:80 failed (98: Address alrea
lis 06 19:34:43 debian nginx[17186]: nginx: [emerg] still could not bind()
lis 06 19:34:43 debian systemd[1]: nginx.service: Control process exited, code=exited, status=1
lis 06 19:34:43 debian systemd[1]: nginx.service: Failed with result 'exit-code'.
lis 06 19:34:43 debian systemd[1]: Failed to start A high performance web server and a reverse

这是我尝试启动 nginx

Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

错误状态 to [::]:80 failed,这意味着您系统上的另一个进程已经在使用端口 80。一个端口只能同时被单个进程占用,这意味着您要么必须

  • 关闭端口 80 上的 运行ning 进程(有几种方法可以检查哪个进程正在使用该端口,google 它适用于您的 OS)或
  • 开始在另一个端口 80 上使用 Nginx(不推荐这样做,因为网络服务器通常 运行 在端口 80 上)。