DEV Community

Nelson Akpa
Nelson Akpa

Posted on • Edited on

2

Step-by-step Guide to Installing Solutions on your VM - Nginx, IIS web Server role

Table of contents

  1. Introduction
  2. Create an Azure Linux VM
  3. Setting Up Nginx on an Azure Linux VM Using SSH
  4. Create an Azure IISVm
  5. Install the IIS web server role via Powershell.
  6. Conclusion.

  7. INTRODUCTION
    Setting up your virtual machine (VM) to host web applications is essential for delivering content efficiently and reliably. This guide provides a step-by-step approach to installing key solutions, such as Nginx, a high-performance web server, and the IIS Web Server role on your VM. Whether you're deploying a Linux-based or Windows-based server, this introduction ensures you’re prepared to configure your environment effectively.

2.0 Create an 'Azure Linux VM'
Login to your Azure account, navigate or search Virtual machines, and then click on Create and click on Azure Virtual Machine
login 1
Azure login 2

2.1 Please, ensure you are on the right subscription and then create a new Resource group name.
RG

2.2. Fill in the Instance details as shown in the images below;
details

2.3. Navigate to the administrator account as shown in the image below;
Account

2.4. Go to the monitoring section and disable boot diagnostics.
Ms

2.5. Navigate to Tags and add your preferred tags.
Tags

2.6. Go to Review and Create and ensure validation is passed.
review

2.7. Click Create
create

2.8. Once deployment is complete, click "Go to Resource"
create

2.9. Linux VM successfully created. Click on public address, extend the idle timeout, and save.
Lm
Idle.

3.0 Setting Up Nginx on an Azure Linux VM Using SSH
Open the terminal on your laptop and follow these steps;

ssh username@hostname_or_ip
🔹 username → The account you want to log in with.
🔹 hostname_or_ip → The IP address or domain name of the VM.
Which is ssh Alpharg@20.77.10.115

LVM

3.1 Enter "Yes"
Cp

3.2 Enter your Linux VM password
Dm

3.3. Type in "sudo su" and click enter
Sudo

3.4 Type in apt update and click enter
It loads up the image below;
apt update

3.5. Type in apt install nginx and click enter.
nginx

3.6. Type Y and click enter.
Nginx

3.7. Nginx web server successfully installed. Now open a tab on your browser to verify by searching for the public IP address before terminating your Terminal window
Nginx
Success

4.0. Create an Azure IISVm
Login to your Azure account, navigate to virtual machines, and click on Create.
Login
4.1. Fill in the project details.
RG
4.2. Fill in the instance details
Instance
4.3. Navigate to the Administrator account and input your preferred username and password.
admin
4.4. Select inbound ports HTTP 80 and RDP(3389) afterward.
ports
4.5. Go to licensing and tick the confirmation box.
lisc
4.6. Navigate to the Monitoring session and disable diagnostics.
diagno
4.7. Go to the Tags section and add any of your choices.
Tags
4.8. Click on the Review and create button and ensure validation is passed.
Review
4.9. Click on the Create **button.
Create
deployment
4.10. Go to **Resource
.
rg
Click on the public address and extend the idle timeout, then save afterward.
PB.
4.11. Click on Connect and click the Select button. Download the RDP file once the IIS VM is configured.
Connect
RdP
4.12. Open the IISVM using a downloaded Microsoft remote desktop.
IISvm
Enter the password
PW
Connect
Close the server manager page that would pop up.
Success
5.0. Install the IIS web server role via Powershell.
5.1. Type PowerShell in the search bar, right-click, and then run as administrator.
Powershell
PS
5.2. Copy and paste 'Install-WindowsFeature -name Web-Server -IncludeManagementTools' and click the enter button.
GO
IIS Vm successfully installed.
success
5.3. Verify this successful installation by copying the public IP address (20.51.111.129) and search it on any browser.
search
Success.
Conclusion
With Nginx and IIS successfully installed and configured, your virtual machine can now efficiently serve web applications. Whether you're leveraging Nginx for its performance or IIS for its seamless integration with Windows environments, this guide has provided the foundation for setting up a robust and reliable web server. Just to remind you, continuous monitoring and optimization are key to ensuring your server effectively meets your needs.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Cloudinary image

Zoom pan, gen fill, restore, overlay, upscale, crop, resize...

Chain advanced transformations through a set of image and video APIs while optimizing assets by 90%.

Explore

👋 Kindness is contagious

DEV shines when you're signed in, unlocking a customized experience with features like dark mode!

Okay