当我想重新启动 nginx 时收到错误:

x nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sun 2024-09-29 10:34:42 UTC; 6s ago
       Docs: man:nginx(8)
    Process: 25645 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 25647 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 31ms

Sep 29 10:34:40 wemx nginx[25647]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Sep 29 10:34:40 wemx nginx[25647]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Sep 29 10:34:41 wemx nginx[25647]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Sep 29 10:34:41 wemx nginx[25647]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Sep 29 10:34:41 wemx nginx[25647]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Sep 29 10:34:41 wemx nginx[25647]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Sep 29 10:34:42 wemx nginx[25647]: nginx: [emerg] still could not bind()
Sep 29 10:34:42 wemx systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Sep 29 10:34:42 wemx systemd[1]: nginx.service: Failed with result 'exit-code'.
Sep 29 10:34:42 wemx systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.

1

  • 1
    简而言之,您有另一个网络服务器已经在该端口上监听。


    – 

0