nginx installation on aws ec2 instance ami ubuntu 18.04

Introduction:
                    Nginx is an open source software for web serving, proxying, caching, media streaming, load balancing and more. This is the fastest web server. Most server administrator like Nginx. We also choose nginx for our web deployment on aws.

Requirement:
1. aws account access
2. running ec2 instance
3. accessing the ec2 instance, to create ec2 please visit https://zrshishir.blogspot.com/2019/10/how-to-create-ec2-instance-on-aws.html or https://medium.com/@zrshishir/how-to-create-ec2-instance-on-aws-amazon-web-service-ami-ubuntu-18-04-abff3b7fd922

Step1: Installation of nginx using terminal. open up your terminal and execute the following command
   $ sudo apt update
   $ sudo apt install nginx

Step2: Adjusting ubuntu firewall (ufw), if you think it is needed to install then you can work with this step. Firstly you should show the ufw list with the execution following command.

 $ sudo ufw app list
         Output=>
         Available applications:
         Nginx Full
         Nginx HTTP
         Nginx HTTPS
         OpenSSH

Now you need to allow port 80 for http request with the following command
       $ sudo ufw allow 'Nginx HTTP'
To see the ufw status execute the following command
        $ sudo ufw status
you should see 'inactive status' because it is managed by aws. Now copy the public ip from your ec2 and paste it on your address bar. You see the screen..




To see the nginx version, run the command
        $nginx -v
To see the nginx file configuration ok. Run the command 
        $ sudo nginx -t
To reload nginx, run the command
        $ sudo systemctl reload nginx
To stop nginx, run the command
        $ sudo systemctl stop nginx


what do you think? why am I using this letter? you will get the answer soon. You can get the clue here or there

Now it is time to be boomed.................
 

Comments

Post a Comment

Popular posts from this blog

composer installation on aws ec2 instance ami ubuntu 18.04

PHP7.3 installation on aws ec2 instance ami ubuntu 18.04