Nginx

How To Install Nginx on Ubuntu 18.04

Nginx is the most popular web server. And more resource-friendly than Apache, the most case we can use the webserver or reverse proxy.

Prerequisites

First you start the installation nginx .you should have a regular, non-root user with Sudo privileges

Step 1 – Installing Nginx

First, need to update package then start Nginx server.

sudo apt update
sudo apt install nginx

When the installation is completed then start Nginx service

sudo service nginx start
   
   or

sudo systemctl start nginx

Check status Nginx server

sudo service nginx status

  or

sudo systemctl status nginx
Output
● 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 Fri 2019-08-23 11:08:12 UTC; 1 days ago
     Docs: man:nginx(7)
 Main PID: 2369 (nginx)
    Tasks: 2 (limit: 1157)
   CGroup: /system.slice/nginx.service
           ├─2369 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           └─2380 nginx: worker process

you can see above, the service started successfully open browser and type public You should see the default Nginx landing page: