Skip to content
Advertisement

Nginx start failed – how I can repair that problem?

I’m a little bit newbie. I’ve got started server few months ago. Everything was okay but now on server I can’t even echo something. How Can I repair nginx server?

My debian

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

and nginx version

nginx version: nginx/1.14.2

that’s my status for 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

and there’s my try to start a nginx

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

Advertisement

Answer

The error states to [::]:80 failed, which means that another process on your system is already using port 80. A port can only be occupied by a single process simultaneously, which means you will either have to

  • close the process running on port 80 (there‘s several ways on how to check which process is using that port, google it for your OS) or
  • start using Nginx on another port 80 (which is not recommended, since webservers usually run on port 80).
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement