How to install nginx in Ubuntu 16.04

January 11, 2018 · 1 min read
Categories: nginx   | apache2   | installation   | ubuntu |

Today we are going to talk about the installation process of nginx which is used as a server and is known for the providing better services in the production environment. I have been using apache2 from a long time. Recently, I got the opportunity to use nginx for one of my recent project. Before starting I want to say that I was already using apache2 for any service I was providing and using on my local services. If you already have apache2 installed and you want to run nginx then you have to stop the apache2 two service otherwise you will receive the error like:

Errors were encountered while processing:
 nginx-core
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
To stop the apache2 service, use the following command.

sudo service apache2 stop
For installing nginx in Ubuntu 16.04, use the following command.

sudo apt-get install nginx
Check the status of the nginx server

sudo systemctl status nginx
If you get the green light or something like: active you are good to go. Do share your views using the comments below.

Please share your Feedback:

Did you enjoy reading or think it can be improved? Don’t forget to leave your thoughts in the comments section below! If you liked this article, please share it with your friends, and read a few more!

We don't share your details with others