. Advertisement .
..3..
. Advertisement .
..4..
I get an error
root@zabbix:/home/appliance# systemctl status nginx.service
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 Wed 2018-07-25 18:33:26 UTC; 1min 27s ago
Process: 30040 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 30037 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Jul 25 18:33:25 zabbix nginx[30040]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:25 zabbix nginx[30040]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:25 zabbix nginx[30040]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:26 zabbix nginx[30040]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:26 zabbix nginx[30040]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:26 zabbix nginx[30040]: nginx: [emerg] still could not bind()
Jul 25 18:33:26 zabbix systemd[1]: nginx.service: Control process exited, code=exited status=1
Jul 25 18:33:26 zabbix systemd[1]: *******Failed to start A high performance web server*** and a reverse proxy server.****
Jul 25 18:33:26 zabbix systemd[1]: nginx.service: Unit entered failed state.
Jul 25 18:33:26 zabbix systemd[1]: nginx.service: Failed with result 'exit-code'.
when trying to start nginx.service. How to fix the failed to start a high performance web server and a reverse proxy server. error? Please give me some advice.
The cause: There could be a problem with the configuration file.
The solution: To discover any issues in the configuration file, use the
nginx -t -c /etc/nginx/nginx.conf
command. If the bugs are fixed, restart nginx withsudo service nginx restart
. It’ll work out.A process is already bound to the HTTP Port . (Especially after upgrading systems!) It will automatically start apache2 by default
This is the first time you try it:
To resolve the problem, run the
sudo lsof -i:80
command to see a list all processes that use port 80. Next, disable server.Stop the process that uses the port 80
It could be a problem in the configuration file.
To find any missing configuration, you can use
nginx -t -c /etc/nginx/nginx.conf
commandThis error can sometimes be caused by Nginx sites that are already running on port 80. If you don’t have one, it is possible to remove default config.