Thursday, December 6, 2018

Install, Setup Nginx on Debian / Ubuntu 18.04

 Install Nginx on Ubuntu 16.04 
Run Following commands on Terminal 
$sudo apt-get update
$sudo apt-get install nginx
Adjust the Firewall
We can list the applications configurations that ufw knows how to work with by typing:
$sudo ufw app list

You should get a listing of the application profiles:

Output
Available applications: 

 Nginx Full  
 Nginx HTTP  
 Nginx HTTPS  
 OpenSSH

You can enable this by typing:

$ sudo ufw allow 'Nginx HTTP'
$ sudo ufw status

Check your Web Server

$ systemctl status nginx

When you have your server's IP address or domain, enter it into your browser's address bar:
http://server_domain_or_IP

You should see the default Nginx landing page, which should look something like this:
Nginx default page
Manage the Nginx Process
$ sudo systemctl stop nginx
$ sudo systemctl start nginx
$ sudo systemctl restart nginx
$ sudo systemctl reload nginx
$ sudo systemctl disable nginx
$ sudo systemctl enable nginx

1 comment:

  1. Thanks for the detailed instructions, pleased to read this!

    ReplyDelete