DEV Community

Anand Parmar
Anand Parmar

Posted on

Install Nginx in Ubuntu 20.04

1. Click on Launch Instances
Image description

2. Add Server Details

  • Enter Server name
  • Select OS Image here we select Ubuntu 22.04
  • Create key pair file this will be use for SSH login

Image description

Image description

Configure network setting

  • Select create security group if you have existing you can select your existing security group also
  • Allow SSH traffic from Anywhere for security best practise allow your or specific List of IP
  • Select Allow both HTTP & HTTPS traffic from internet

Image description

Create Elastic IP
Normal EC2 server if restart or Reboot then there Public IP will always change there for we are creating Elastic IP separately

  • Click on Allocate Elastic IP address

Image description

Click on Allocate

Image description

Click on Assign Elastic IP

Image description

Select that created Ec2 server from List
Image description

Here you can check that Elastic IP
Image description

Connect to SSH

chmod 400 TestServer.cer
sudo ssh -i TestServer.cer ubuntu@54.205.12.196

Install Nginx

sudo apt update
sudo apt install -y nginx

Image description

Top comments (0)