nginx 仍在端口 80 上 - bind() 至 0.0.0.0:80 失败(98:地址已在使用中)

nginx 仍在端口 80 上 - bind() 至 0.0.0.0:80 失败(98:地址已在使用中)

我编辑了这个文件:

/etc/nginx/sites-enabled/default

listen 4444;-https://dpaste.de/nrUy9/

但仍然在端口 80 上。我该怎么办?端口 80 由 apache 使用。

我的错误:

root@user /etc/nginx/sites-enabled # service nginx restart
Restarting 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

删除 IPv6 绑定块(类似于 ::1:80

相关内容