DEV Community

Cover image for Installing a WebServer on Win Server 2019 VM
Ola
Ola

Posted on

Installing a WebServer on Win Server 2019 VM

First and foremost, what is a web server?
Imagine you have a toy box at home where you keep all your favourite toys. Now, let’s say your friend wants to see what toys you have. Instead of coming to your house, they can use a special magic box that lets them see and even play with your toys from their own home. This magic box is connected to your toy box and shows your toys to your friend whenever they ask.

webserver to a kid
A web server is like that magic box. It keeps a lot of information (like your toys) and when someone on the internet wants to see that information (like your friend), the web server shows it to them. So, it's a special computer that helps share information with other computers.

A web server is a specialized software or hardware system responsible for handling HTTP(S) (Hypertext Transfer Protocol) requests from clients, typically web browsers, and serving them the appropriate web content, such as HTML pages, images, videos, or other resources. The primary functions of a web server include:

  1. Hosting Websites: Web servers store, process, and deliver web pages to users. They manage domain names, manage content, and ensure that web pages are available to users around the clock.
  2. Handling Requests and Responses: When a user enters a URL in their browser, the web server processes the incoming HTTP request, retrieves the requested content, and sends it back to the client as an HTTP response.
  3. Security: Web servers implement various security protocols, such as SSL/TLS, to encrypt data transmitted between the server and clients. They also handle authentication and authorization to protect sensitive data and resources.
  4. Load Balancing and Scalability: Web servers can distribute incoming traffic across multiple servers to ensure efficient resource utilization, high availability, and reliability. They support scalability by adding or removing servers as demand fluctuates.
  5. Logging and Monitoring: Web servers maintain logs of all transactions, which are crucial for analyzing traffic, debugging issues, and monitoring performance.

Popular web server software includes Apache HTTP Server, Nginx, Microsoft Internet Information Services (IIS), and LiteSpeed. Each of these solutions offers unique features and optimizations to cater to different performance, security, and scalability requirements.

In a previous post, we deployed a Win 11 VM. Now, we shall install a webserver on a similar server (Win Server 2019).

Open PowerShell
Click on the Start menu.

PowerShell
Type PowerShell and open Windows PowerShell or Windows PowerShell ISE as an administrator(right-click and select Run as administrator)
PS as admin
Provide your credentials
Credentials
Install IIS by running this command

Install-WindowsFeature -name Web-Server -IncludeManagementTools
Enter fullscreen mode Exit fullscreen mode

Run code
Install progress
Install Success

Visit the server/public IP in a browser to validate that it works
Image description

Top comments (0)