Are you getting the following error, when you try to start nginx service?
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
Then it means nginx or some other process is already using port 80 on your web server. You need to kill all process which is using port 80. You can kill those processes by using fuser command:
# sudo fuser -k 80/tcp
Now, execute the nginx restart command to proceed.
# nginx -s reload
or
# systemctl restart nginx.service
or
# service nginx start
Now, nginx proxy is up now. You can check the status of nginx by using:
# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-05-24 19:10:31 CEST; 1min 31s ago
Process: 12853 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE)
Process: 11021 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
Process: 13171 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 13168 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 13172 (nginx)
CGroup: /system.slice/nginx.service
├─13172 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
├─13173 nginx: worker process
├─13174 nginx: worker process
├─13175 nginx: worker process
└─13176 nginx: worker process
May 24 19:10:31 gtechhub systemd[1]: Starting A high performance web server and a reverse proxy server...
May 24 19:10:31 gtechhub systemd[1]: Started A high performance web server and a reverse proxy server.
If you find this article helpful, please consider making a donation. [paypal_donation_button]