dev-resources.site
for different kinds of informations.
From Scratch to Server: Deploying a Linux Virtual Machine with Nginx on Azure
Published at
11/22/2024
Categories
Author
Precious Oladele
Categories
1 categories in total
open
INTRODUCTION
A virtual machine is like a computer inside a computer. It is a computer that is based on software and has its own operating system and applications.
NGINX is a reverse proxy and web server that is dependable and quick. It serves as a mediator between users and backend systems, distributes traffic among servers, and delivers web pages. It is frequently used to power websites and applications since it is efficient and versatile.
Getting Started: log in to your Azure account. and In the "Search resources, services and docs" field, type “virtual machines”. From the list of search results, click on the “Virtual machine” option.
- Click the “Create” button to start the virtual machine creation process
- Select the appropriate subscription and create a resource group by clicking the create resource group button and giving it a name
- Enter the VM details, including its name, operating system, size, and configuration settings.
- Create an Administrator Account. We need a username and a password in case we need to connect to the Virtual Machine.
- Locate the "Inbound ports" section. Ensure the checkbox for "HTTP (80)" is selected. This allows external communication with your web server.
- Click “Next” till we get to boot diagnostics in the Monitoring tab, and click on “disable”.
- click on the tag tab, this is to identify the billing accounts
- Carefully review all your configuration choices. Once satisfied, click "Review + create" followed by "Create" to initiate the VM deployment process. The portal will display the deployment progress.
- wait for deployment to complete. it might take a while
- Once deployment is complete, navigate to your VM resource and click "Go to resource.
- first thing to do here is to click on the public Ip address
- Move the slider to the maximum, this is to increase the timeout and click on save when done.
- Open a command-line interface (CLI) tool like Windows PowerShell or ubuntu terminal. Use the following SSH command, replacing the bracketed placeholders with your actual credentials: ssh [username]@[public_ip_address]
- When prompted, confirm that you want to connect by typing "yes" and press Enter.
- Enter in the password you created for the user and press enter
Update and Install Nginx
- Switch to the root user with sudo su.
- Update your package lists with apt update and install Nginx using apt install nginx
- Open a web browser and enter the public IP address you obtained earlier. If Nginx is running correctly, you should see a default welcome page. Congratulations! You have successfully created a Linux virtual machine on Microsoft Azure and installed the Nginx web server. This is a foundational step for hosting web applications or deploying other web services.
Articles
12 articles in total
Efficient Scaling: An Introduction to Virtual Machine Scale Sets (VMSS
read article
Scaling the Heights: An Introduction to Azure Kubernetes Service (AKS)
read article
Click, Code, Host: A Beginner's Guide to Azure App Services
read article
Creating an EC2 Instance and Installing IIS: A Beginner's Guide
read article
Provide private storage for internal company documents
read article
Provide shared file storage for the company offices
read article
From Setup to Uptime: Creating a Highly Available Windows 11 VM
read article
Provide storage for the public website
read article
Provide storage for the IT department testing and training
read article
Connecting to an EC2 Instance with Ubuntu and Installing NGINX on AWS
read article
Building the Foundation: How to Connect to a Windows Virtual Machine and install Windows Server
read article
From Scratch to Server: Deploying a Linux Virtual Machine with Nginx on Azure
currently reading
Featured ones: