Nginx anti-proxy port reports an error

add

[root@localhost conf.d]-sharp vi corenet.conf
server
{
listen 80;
server_name www.liangzda.com;
location / {
proxy_pass http://localhost:5000;
}
}
execute

[root@localhost conf.d]-sharp nginx-s reload
[root@localhost conf.d]-sharp systemctl restart nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx. Service" and "journalctl-xe" for details.

detailed errors are as follows
[root@localhost conf.d]-sharp systemctl status nginx.service
nginx.service-The nginx HTTP and reverse proxy server
Loaded: loaded (/ usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since II 2018-04-10 20:31:27 CST; 43s ago
Process: 2816 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
Process: 2813 ExecStartPre=/usr/sbin/nginx-t (code=exited, status=0/SUCCESS)
Process: 2811 ExecStartPre=/usr/bin/rm-f / run/nginx.pid (code=exited, status=0/SUCCESS)

April 10 20:31:25 localhost.localdomain nginx [2816]: nginx: [emerg] bind () to [::]: 80 failed (98: Address al.use)
April 10 20:31:26 localhost.localdomain nginx [2816]: nginx: [emerg] bind () to 0.0.0.0 failed (98: Address.use)
April 10 20:31:26 localhost.localdomain nginx [2816]: nginx: [emerg] bind () to [:]: 80 Failed (98: Address al.use)
April 10 20:31:26 localhost.localdomain nginx [2816]: nginx: [emerg] bind () to 0.0.0.0 localhost.localdomain nginx 80 failed (98: Address.use)
April 10 20:31:26 localhost.localdomain nginx [2816]: nginx: [emerg] bind () to [::]: 80 failed (98: Address al.use)
April 10 20:31:27 localhost.localdomain nginx [2816]: nginx: [emerg ] still could not bind ()
April 10 20:31:27 localhost.localdomain systemd [1]: nginx.service: control process exited, Code=exited status=1
April 10 20:31:27 localhost.localdomain systemd [1]: Failed to start The nginx HTTP and reverse proxy server.
April 10 20:31:27 localhost.localdomain systemd [1]: Unit nginx.service entered failed state.
April 10 20:31:27 localhost.localdomain systemd [1]: nginx.service failed.
Hint: Some lines were ellipsized, use-l to show in full.

Mar.02,2021

Port is occupied. You should have started nginx, or some other program has occupied port 80

.

you can use ss-lntp | egrep': 80\ s' to see what program is occupying port 80

.
Menu