---
title: 'How to install and configure IIS on Windows Server  | Zomro'
description: 'Although most sites available on the Internet run on servers running Linux, it is possible to run sites on a server running Windows Server.'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623213107-2.jpg'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * How to install and configure IIS on Windows Server 



# How to install and configure IIS on Windows Server

12-06-2023

In this article, we will install and carry out the basic settings of the IIS web server on a server running the Windows Server 2012-2019 operating system.

## **1\. Install the IIS web server role**.

Start - Server Manager

![How to install and configure IIS on Windows Server - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623213107-2.jpg)

Next Management (Manage) - Add Roles and Features (Add Roles and Features)

![How to install and configure IIS on Windows Server - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623213402-5.jpg)

Click Next

![How to install and configure IIS on Windows Server - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623223029-2.jpg)

Leave the selected option Installing roles or features (Role-based or feature-based installation) and Next

![How to install and configure IIS on Windows Server - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623214136-7.jpg)

Select the local server, click Next (Next)

![How to install and configure IIS on Windows Server - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623222914-1.jpg)

Select Web Server Web Server (IIS), click Add Features and Next

![How to install and configure IIS on Windows Server - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623223303-3.jpg)

In the next window Next

![How to install and configure IIS on Windows Server - 7](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623224101-4.jpg)

Next

![How to install and configure IIS on Windows Server - 8](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230623224157-5.jpg)

Choose to install CGI (in the Application Development section). I also recommend installing an additional FTP server, which will allow you to upload files to the server using an FTP client (for example, FileZilla)

![How to install and configure IIS on Windows Server - 9](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628173657-2.jpg)

Next (Next), check the box to automatically restart the server after installing the role and the Install button

![How to install and configure IIS on Windows Server - 10](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/23/image-20230624011117-3.jpg)

After restarting the server, IIS will start automatically. But if you need to restart, just run the command (Start - Run)

> iisreset 

or run

> iisreset /start

To test the operation of the web server, open the page in the browser http://localhost/

  
![How to install and configure IIS on Windows Server - 11](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/24/image-20230624041718-1.jpg)

The default site root folder is located at the path

C:\inetpub\wwwroot

But it often happens that you need to host several sites on a server. For this reason, let's create a test site with its own root folder.

## 

## **2\. Create a site in IIS**

First, let's create the site's root folder on the server's disk. For example, we will use the site name domain.name

![How to install and configure IIS on Windows Server - 12](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625195006-2.jpg)

Next, in the Server Manager - in the Tools menu - open the IIS Manager (Inet Information Services (IIS) Manager)

![How to install and configure IIS on Windows Server - 13](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625194650-1.jpg)

In the IIS Manager window, you need to open the server menu - Sites - right-click - Add website ... (Add Website ...)

![How to install and configure IIS on Windows Server - 14](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625195253-3.jpg)

Fill in the required fields indicated in the screenshot

![How to install and configure IIS on Windows Server - 15](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625195945-1.jpg)

Site name - an arbitrary name of the site.

Physical path - the path to the root folder of the site.

Type (Type) - protocol type (http or https). For the initial setup of the site, the http protocol will suffice.

Host name - domain name of the site.

We press the OK button and we see that in the list of sites, in addition to the default site, our newly created site has been added.

![How to install and configure IIS on Windows Server - 16](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625202134-1.jpg)

To test the site, let's create a file in its root directory called index.html and copy the following content into this file

> <html>  
>  <body>  
>  Zomro: Test HTML page  
>  </body>  
>  </html>

![How to install and configure IIS on Windows Server - 17](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625203311-2.jpg)

Note: The index.html file can be opened with Notepad or another text editor.

Open the page of your site in the browser (in our example it is domain.name) and you will see such a page.

![How to install and configure IIS on Windows Server - 18](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/25/image-20230625204221-2.jpg)

## 

## **3\. IIS and PHP integration**

Before completing this step, PHP must be installed on the server. To do this, use the article: [How to install and configure PHP on Windows Server](https://zomro.com/blog/faq/363-how-to-install-and-configure-php-on-windows-server)

In order for the web server to successfully process php requests, it is necessary to integrate IIS and PHP. To do this, in the IIS Module, go to the menu of our site and open the Handler Mappings

![How to install and configure IIS on Windows Server - 19](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628225112-1.jpg)

in the list of Actions (Action) of which there is a menu item "Add module handler" (Add Module Mapping). Fill out the form as in the screenshot and click the "Request Restrictions..." button

![How to install and configure IIS on Windows Server - 20](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628230917-8.jpg)

Select the option "File or folder" (File or folder)

![How to install and configure IIS on Windows Server - 21](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628230240-4.jpg)

Click OK, then OK again on the module handler form and confirm the creation of the action

![How to install and configure IIS on Windows Server - 22](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628230618-6.jpg)

In the list of handlers, the newly created one should appear:

![How to install and configure IIS on Windows Server - 23](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628231112-9.jpg)

Now let's add a setting at the web server level so that the index.php file opens as the default page.

To do this, in the menu of the server (and not the site), open the "Default document" (Default document),

![How to install and configure IIS on Windows Server - 24](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628232418-1.jpg)

select "Add" (Add) in the list of actions, fill in the Name field with the index.php value and click OK

![How to install and configure IIS on Windows Server - 25](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628232605-3.jpg)

Result

![How to install and configure IIS on Windows Server - 26](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628232823-4.jpg)

You must restart the web server to apply all settings. To do this, stop it

![How to install and configure IIS on Windows Server - 27](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628233023-5.jpg)

and run

![How to install and configure IIS on Windows Server - 28](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628233104-6.jpg)

Web server integration with PHP is set up.

Let's test the PHP script. To do this, in the root folder of the site, create a file called index.php, open it in notepad and add the following content

> <?php  
>  phpinfo();  
>  ?>

![How to install and configure IIS on Windows Server - 29](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628233649-7.jpg)

Save the file and refresh the site in the browser "http://domain.name/"

A page like this should appear

![How to install and configure IIS on Windows Server - 30](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a55%40server-panel.net/2023/06/28/image-20230628233834-8.jpg)​​​​​​​

This means that PHP scripts are successfully processed by the web server.

In this article, we learned how to install an IIS web server on Windows Server 2012-2019, perform initial settings, integrate with previously installed PHP, and create a separate site in IIS Manager.

We also suggest you other useful articles:

  * [Disable UDP for RDP connections to Windows Server](https://zomro.com/blog/faq/429-dissable-udp-for-rdp-on-windows)
  * [How to view RDP connection logs in Windows Server 2016, 2019](https://zomro.com/blog/faq/277-how-to-view-rdp-connection-logs-in-windows-2016-2019)
  * [How to Install and Configure IIS FTP Server on Windows Server 2019](https://zomro.com/blog/faq/315-kak-ustanovit-i-nastroit-ftp-server-iis-na-windows-server-2019)



Similar articles:

[How to install FileGator on Centos Nginx-PHP-FPM](https://zomro.com/blog/faq/381-how-to-install-filegator-on-centos-nginx-php-fpm-zomro) [MySQL basics](https://zomro.com/blog/faq/264-osnovy-raboty-v-mysql) [Creating a backup from the console through the cron scheduler](https://zomro.com/blog/faq/357-creating-a-backup-from-the-console-through-the-cron-scheduler) [Site transfer on servers with VestaCP panel](https://zomro.com/blog/faq/384-site-transfer-on-servers-with-vestacp-panel) [How to install Minecraft: Java Edition server on Ubuntu 20.04](https://zomro.com/blog/faq/225-ustanovka-servera-igry-minecraft-java-edition-na-ubuntu-2004)

[ Dedicated servers from €88.80/mon ](/dedicated-servers)
