In this guide from the Windows Tutorials, we want to teach you to Set up and Configure IIS on Windows Server 2022.
Windows Server 2022 is the tenth and latest major LTSC release of the Windows Server operating system by Microsoft, as part of the Windows NT family of operating systems.
Internet Information Services (IIS) is a flexible, general-purpose web server from Microsoft that runs on Windows systems to serve requested HTML pages or files.
An IIS web server accepts requests from remote client computers and returns the appropriate response. This basic functionality allows web servers to share and deliver information across local area networks (LAN), such as corporate intranets, and wide area networks (WAN), such as the Internet.
Steps To Set up and Configure IIS on Windows Server 2022
To install IIS on your Windows server 2022 follow the steps below:
Install IIS on Windows Server 2022
1- From your start menu, type server manager and open it.
2- In your server manager dashboard click on the Add roles and features:
3- Click next to continue on the Before you begin window:
4- In the Select installation type window, you should click on the Role-based or feature-based installation and press next to continue:
5- At this step, you need to select the destination server. As you are set up IIS on your local machine, choose Select a server from the server pool and press next.
On the other hand, you can select another server that you are managing from here or a VHD.
6- Now on the Select server roles check the box next to the Web Server (IIS):
6- This will open a new window advising that additional features are required, click the Add Features button to install these as well. Click Next back on the Select server roles menu when this is complete:
7- At this point, you don’t need to install any additional features. So click next to continue.
8- Read the information about the IIS web server role and press next.
9- Here on the Select role services window, you can install additional services for IIS. You can always come back and add more later, so press next to install the defaults:
10- In the Confirm installation selections window, review the items that are to be installed and click Install when you’re ready to proceed with installing the IIS web server on your Windows server 2022:
Note: With the standard IIS installation, no reboot should be required. If you remove the role a reboot will be needed.
11- When your IIS installation is completed, press the close button.
Access IIS Default Page
At this point, IIS should be running on port 80 by default with the firewall rule HTTP traffic enabled in Windows firewall automatically.
Now you can access the default IIS page by typing your server’s IP address in your web browser:
If you see this page means that you have set up IIS on your Windows server 2022 correctly.
By installing IIS, a website called Default Web Site is created by default, which can be used to test the health of IIS.
This website is configured to respond to user requests from the HTTP protocol over port 80.
In this guide, you are going to use the default site by getting to know where its document root is and how to host a simple website within it.
To configure the default site in IIS on Windows server 2022, follow the steps below.
Configure the Default Site in IIS Server 2022
1- Open your server manager and click on the tools option and choose the Internet Information Services (IIS) Manager.
2- You need to expand the server name:
3- Then, expose the default site on IIS server 2022:
You will see the Default website icon:
The default site on IIS server 2022 stores its files in a particular directory. To display this information, double click on it, choose the Manage Website then, choose the Advanced settings:
This will open a window with all of the Default Sites information such as files or Document Root. If you click on “Physical Path”, you can choose a different document root.
4- The “Default documents” feature in IIS Server 2022 helps you to specify the default files to return when a client does not request a specific file from the web server. Double-click on it to check the files shown.
You will see:
5- Now create an index.html file in the document root and check if it gets loaded in IIS server 2022.
To do this, open your notepad and add the following HTML code to it:
<html> <head> <title>Welcome To IIS!</title> </head> <body> <h1>Success! It is working correctly!</h1> </body> </html>
Then, save it to the below path:
This PC>Local Disk(C):>inetpub>wwwroot
In your web browser type your server’s IP address:
You will see a page like this:
If you see this page means that it loaded successfully.
IIS is compared with Apache, which is also a kind of web server that is freely available to everyone. We can simply say that both work the same except that apache can be used almost on any operating system such as Windows, Linux, and Mac, While the IIS is only available for windows.
Here you learn to Set up and Configure IIS on your Windows server.
Hope you enjoy it.
Also, you may be like these articles:
Install and Configure Apache on Windows Server 2022
Thanks for your amazing guide.