Overview
Pre checks
Port 80
- Check No Other Service Is Running on Port 80
$ sudo netstat -tluap --numeric-ports | grep '80 'Port 443
- Check No Other Service Is Running on Port 443
$ sudo netstat -tluap --numeric-ports | grep '443'NOTE!: If you found Apache or Other Service is Running on Port 80/443, Then Stop That Service and Restart NGINX.
How to Fix NGINX - Address Alredy in Use Error
Port 80
- If no other service is running on port 80, Then execute Following Command.
$ sudo fuser -k 80/tcp;
$ sudo service nginx restartPort 443
- If no other service is running on port 443, Then execute Following Command.
$ sudo fuser -k 443/tcp;
$ sudo service nginx restart