0% found this document useful (0 votes)
13 views20 pages

Create Azure VM and Deploy Nginx

This document outlines the steps to create and configure an Azure Virtual Machine (VM) using the Azure portal, including setting up the VM with Ubuntu Server, SSH access, and installing Nginx. It details the process of deploying a portfolio on the VM by cloning a GitHub repository and moving the files to the appropriate directory. Finally, it includes instructions for ensuring Nginx serves the portfolio correctly by adjusting firewall settings and permissions.

Uploaded by

aroramayank946
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views20 pages

Create Azure VM and Deploy Nginx

This document outlines the steps to create and configure an Azure Virtual Machine (VM) using the Azure portal, including setting up the VM with Ubuntu Server, SSH access, and installing Nginx. It details the process of deploying a portfolio on the VM by cloning a GitHub repository and moving the files to the appropriate directory. Finally, it includes instructions for ensuring Nginx serves the portfolio correctly by adjusting firewall settings and permissions.

Uploaded by

aroramayank946
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Assignment – 1

Creating an Azure VM
[Link] to azure portal and sign in with official email id

[Link] on create Virtual machines


[Link] Virtual machine (best for lower-traffic workloads)

[Link] a new resource group – portfolio-rg


[Link] virtual machine name (ujjwal-vm1) and select region (Central
India)

[Link] all the 3 Availability zone


[Link] operating system image (Ubuntu Server 24.04 LTS)

[Link] Virtual Machine configuration (B1s – 1 vCPU, 1 GB RAM)


9. Select SSH public key as the Authentication type
10. Enter username (ujjwal123)
[Link] to networking tab and select no load balancer
[Link] on Review + create

[Link] validation passed click on create


Overview of settings
[Link] private key

Deployment of the machine will begin now


Now the VM has been successfully deployed .
SSH into VM
[Link] command prompt
ssh -i private_key.pem username@public_ip_of_vm
[Link] the ubuntu machine using apt update command

Starting nginx on VM
Nginx is a web server – it listens on port 80 (HTTP) and serves files from a directory. We will use it to serve
our portfolio on public ip of our VM.

[Link] nginx on VM using apt install nginx -y command

[Link] nginx service using systemctl command


[Link] port 80 in firewall

[Link] allow port 80 from Azure portal


- Select source port as any (*)
- Select service HTTP
[Link] nginx
[Link] your public IP address ([Link]) of virtual machine in
browser to see if nginx is working

Deploying Portfolio on this URL


[Link] you portfolio in a github repo
[Link] clone your repo in Virtual machine
- create a folder tmp
- git clone repo inside this folder

[Link] these files inside /var/www/html folder using cp command

[Link] all permissions using chmod command

[Link] nginx to see your portfolio

You might also like