@David_138

Как без ошибок запустить nginix в Убунту 20.04?

ИзучаюNginx по этому уроку https://www.youtube.com/watch?v=gSPOI6-ydU4&list=P...
Застрял в моменте запуска 3:49
Не могу стартануть «service nginx start» - выводит сообщение :

ubuntu@ubuntu-VirtualBox:/etc/init.d$ systemctl start nginx
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'nginx.service'.
Authenticating as: Ubuntu,,, (ubuntu)
Password:
==== AUTHENTICATION COMPLETE ===
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
ubuntu@ubuntu-VirtualBox:/etc/init.d$ systemctl status nginx
● nginx.service - LSB: nginx init.d dash script for Ubuntu or other *nix.
Loaded: loaded (/etc/init.d/nginx; generated)
Active: failed (Result: exit-code) since Sat 2021-07-31 04:35:34 CDT; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 8754 ExecStart=/etc/init.d/nginx start (code=exited, status=7)

Jul 31 04:35:32 ubuntu-VirtualBox nginx[8759]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 31 04:35:32 ubuntu-VirtualBox nginx[8759]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 31 04:35:33 ubuntu-VirtualBox nginx[8759]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 31 04:35:33 ubuntu-VirtualBox nginx[8759]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 31 04:35:34 ubuntu-VirtualBox nginx[8759]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 31 04:35:34 ubuntu-VirtualBox nginx[8759]: nginx: [emerg] still could not bind()
Jul 31 04:35:34 ubuntu-VirtualBox nginx[8754]: ...fail!
Jul 31 04:35:34 ubuntu-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited, status=7/NOTRUNNING
Jul 31 04:35:34 ubuntu-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'.
Jul 31 04:35:34 ubuntu-VirtualBox systemd[1]: Failed to start LSB: nginx init.d dash script for Ubuntu or other *nix..
ubuntu@ubuntu-VirtualBox:/etc/init.d$ cat /var/log/nginx/error.log
2021/07/31 03:56:01 [emerg] 6530#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 03:56:01 [emerg] 6530#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 03:56:01 [emerg] 6530#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 03:56:01 [emerg] 6530#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 03:56:01 [emerg] 6530#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 03:56:01 [emerg] 6530#0: still could not bind()
2021/07/31 03:58:11 [error] 6522#0: *1 open() "/usr/local/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.0.105, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.105", referrer: "192.168.0.105"
2021/07/31 04:06:19 [error] 6522#0: *2 open() "/usr/local/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.0.104, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.105", referrer: "192.168.0.105"
2021/07/31 04:27:02 [emerg] 8617#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:27:02 [emerg] 8617#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:27:02 [emerg] 8617#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:27:02 [emerg] 8617#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:27:02 [emerg] 8617#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:27:02 [emerg] 8617#0: still could not bind()
2021/07/31 04:28:19 [emerg] 8644#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:19 [emerg] 8644#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:19 [emerg] 8644#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:19 [emerg] 8644#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:19 [emerg] 8644#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:19 [emerg] 8644#0: still could not bind()
2021/07/31 04:28:29 [emerg] 8660#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:29 [emerg] 8660#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:29 [emerg] 8660#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:29 [emerg] 8660#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:29 [emerg] 8660#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:28:29 [emerg] 8660#0: still could not bind()
2021/07/31 04:30:19 [emerg] 8683#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:30:19 [emerg] 8683#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:30:19 [emerg] 8683#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:30:19 [emerg] 8683#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:30:19 [emerg] 8683#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:30:19 [emerg] 8683#0: still could not bind()
2021/07/31 04:35:32 [emerg] 8759#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:35:32 [emerg] 8759#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:35:32 [emerg] 8759#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:35:32 [emerg] 8759#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:35:32 [emerg] 8759#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/07/31 04:35:32 [emerg] 8759#0: still could not bind()

Как исправить это
  • Вопрос задан
  • 106 просмотров
Решения вопроса 1
rozhnev
@rozhnev
Fullstack programmer, DBA, медленно, дорого
Порт 80 уже кем-то занят. Проверте кто слушает и прибейте
netstat -antp | grep LISTEN
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы