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