Varatchi

Journey on self-mastery & tech transformation

Create a Linux based VM in Azure and install Nginx web server

In this blog, I have created a Linux based Virtual machine Azure using a simple configuration and installed a Nginx Web Server by connecting via SSH. And enabled port 80 in NSG to access and verify the web server.

Create a Virtual Machine from Azure marketplace 

Selected Ubuntu v24.04 for the image

For system authentication, selected password and provided the credentials

By default, SSH is set which we need to connect the Linux machine for web server(nginx) installation.

Left default settings for Disks

Created a new Virtual Network(vNet) and rename the subnet name

Left default settings as below

Reviewed the configurations and settings and created the VM

Overview of the newly created Linux based VM


SSH into the Linux VM using its public IP address

SSH into the VM using its public IP address and system credentials

Updated the Linux package index as below

Installed Nginx Web Server

Execute CURL command to check the installation of web server

Try the public IP address in the browser to verify the web server installation

We must enable port 80 for HTTP service. During VM creating, we enabled only the SSH connection.

NSG (Network Security Group) is a resource where we can define our Inbound and Outbound Rules. Navigate to Network Settings and add an inbound rule for port 80 for HTTP connection.

Add an inbound rule to allow HTTP (port 80) service, so that we can connect to the web-server home page.

The lower the priority number, the higher the priority is.

Now, the curl command received a response from the nginx web server.

Tried in the browser as well.

Thank you for reading.

This demonstration is to show how to create a linux based in VM and how to interact with it via SSH. I will reference this blog URL in other demonstrations when there is a need to create VM for that scenario or project.

Please leave your comments and suggestions. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *