Cannot start Nginx

phuongdzu

Verified User
Joined
Jul 24, 2013
Messages
26
Hello
After update DA 1.59.4 and "Update All" in "CustomBuild 2.0" Nginx stop and cannot start.
PLEASE HELP

I try commands:
Code:
nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

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

Code:
systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-11-11 14:18:12 UTC; 41s ago
Process: 40164 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/F
AILURE)
Process: 40163 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=0/SUC
CESS)

Nov 11 14:18:10 server nginx[40164]: nginx: [emerg] bind() to 127.0.0.1:80 failed (98: Address alrea
dy in use)
Nov 11 14:18:11 server nginx[40164]: nginx: [emerg] bind() to 185.112.158.168:80 failed (98: Address
already in use)
Nov 11 14:18:11 server nginx[40164]: nginx: [emerg] bind() to 127.0.0.1:80 failed (98: Address alrea
dy in use)
Nov 11 14:18:11 server nginx[40164]: nginx: [emerg] bind() to 185.112.158.168:80 failed (98: Address
already in use)
Nov 11 14:18:11 server nginx[40164]: nginx: [emerg] bind() to 127.0.0.1:80 failed (98: Address alrea
dy in use)
Nov 11 14:18:12 server nginx[40164]: nginx: [emerg] still could not bind()
Nov 11 14:18:12 server systemd[1]: nginx.service: Control process exited, code=exited status
=1
Nov 11 14:18:12 server systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
0m
Nov 11 14:18:12 server systemd[1]: nginx.service: Unit entered failed state.
Nov 11 14:18:12 server systemd[1]: nginx.service: Failed with result 'exit-code'.
 
Do you have Apache? Errors here indicate that ports 80 is already in use

Code:
fuser -k 80/tcp

After that Restart Nginx
 
Last edited:
Agree with the previous reply, a service is already running on port 80. You can check it with this command too:
Code:
lsof -i :80

You can stop the running service and try to start nginx.
 
Back
Top