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.
Top comments (0)