As you may know, your cloud server comes with the Apache web server pre-installed. In order to avoid conflicts, you should consider stopping the Apache service or uninstalling it entirely.
While logged in as the root
user, run this command to stop the Apache web service:
service apache2 stop
And to remove Apache entirely, run this command:
apt remove apache2
Please note: if you are not logged in as the root user, you must make sure that your user has sudo privileges and append “sudo” to each command.
Now you can install NGINX, if you haven’t already, by running this command: