我读过其他问题,但没有找到问题的答案。而且作为新手,我比平时更迷茫。
问题是,尝试安装 Nginx 并尝试查看ufw status
是否status: inactive
此后我写下systemctl status nginx
并得到以下结果:
pipo@pipo-X542UV:~$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since mar 2018-02-06 17:39:07 CET; 14min ago
feb 06 17:39:06 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to
[::]:80 failed (98: Address already in use)
feb 06 17:39:06 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to
0.0.0.0:80 failed (98: Address already in us
feb 06 17:39:06 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to
[::]:80 failed (98: Address already in use)
feb 06 17:39:07 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to
0.0.0.0:80 failed (98: Address already in us
feb 06 17:39:07 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to
[::]:80 failed (98: Address already in use)
feb 06 17:39:07 pipo-X542UV nginx[27941]: nginx: [emerg] still could
not bind()
feb 06 17:39:07 pipo-X542UV systemd[1]: nginx.service: Control
process exited, code=exited status=1
feb 06 17:39:07 pipo-X542UV systemd[1]: Failed to start A high
performance web server and a reverse proxy serve
feb 06 17:39:07 pipo-X542UV systemd[1]: nginx.service: Unit entered
failed state.
feb 06 17:39:07 pipo-X542UV systemd[1]: nginx.service: Failed with
result 'exit-code'.
lines 1-14/14 (END)
尝试过多次卸载并重新安装
我做错了什么?
提前致谢!
答案1
地址已被使用
端口 80 正在使用中。通常这意味着您正在运行 apache2,或另一个 nginx 实例。