В данной статье мы установим и проведем базовые настройки веб-сервера IIS на сервере с операционной системой Windows Server 2012-2019.
1. Установим роль веб-сервера IIS.
Пуск (Start) — Диспетчер серверов (Server Manager)
Далее Управление (Manage) — Добавить Роли и Компоненты (Add Roles and Features)
Жмем Далее (Next)
Оставляем выбранную опцию Установка ролей или компонентов (Role-based or feature-based installation) и Далее (Next)
Выбираем локальный сервер, жмем Далее (Next)
Выбираем Веб сервер Web Server (IIS), жмем Добавить Компоненты (Add Features) и Далее (Next)
В следующем окне Далее (Next)
Далее (Next)
Выбираем для установки CGI (в разделе Application Development). Также рекомендую дополнительно установить FTP сервер, что позволит закачивать файлы на сервер с помощью FTP клиента (например FileZilla)
Далее (Next), ставим галочку для автоматического перезапуска сервера после установки роли и кнопку Install
После перезапуска сервера, IIS запустится автоматически. Но если необходимо перезапустить, достаточно выполнить команду (Пуск — Выполнить)
iisreset
или запустить
iisreset /start
Для проверки работы веб-сервера, откройте в браузере страницу http://localhost/
Корневая папка сайта по умолчанию размещена по пути
C:\inetpub\wwwroot
Но часто бывает, что на сервере необходимо разместить несколько сайтов. По этой причине, создадим тестовый сайт со своей корневой папкой.
2. Создание сайта в IIS
Вначале создадим корневую папку сайта на диске сервера. Для примера, будем использовать имя сайта domain.name
Далее в Диспетчере серверов (Server Manager) — в меню Средства (Tools) — откроем Диспетчер служб IIS (Inetnet Information Services (IIS) Manager)
В окне Диспетчера служб IIS необходимо открыть меню сервера — Сайты (Sites) — правой кнопкой мышки — Добавить веб-сайт… (Add Website…)
Заполним указанные на скриншоте обязательные поля
Имя сайта (Site name) — произвольное название сайта.
Физический путь (Physical path) — путь к корневой папке сайта.
Тип (Type) — тип протоколв (http или https). Для начальнйо настройки сайта будет достаточно http протокола.
Имя узла (Host name) — доменное имя сайта.
Жмем кнопку Ок и видим, что в списке сайтов, кроме сайта по умолчанию, добавился наш, только что созданный сайт.
Чтобы проверить работу сайта, создадим в его корневой директории файл с именем index.html и скопируйте в этот файл такое содержимое
<html>
<body>
Тело страницы: Test HTML page
</body>
</html>
Примечание: файл index.html можно открыть программой Блокнот или другим текстовым редактором.
Откройте в браузере страницу своего сайта (в нашем примере это domain.name) и увидите такую страницу.
3. Интеграция IIS и PHP
Перед выполнением этого пункта, необходимо установить на сервере PHP. Для этого воспользуйтесь статьей: Как установить и настроить PHP на Windows Server
Чтобы веб-сервер мог успешно обрабатывать php запросы, необходимо выполнить интеграцию IIS и PHP. Для этого в Модуле IIS перейдите в меню нашего сайта и откройте Отображение обработчика (Handler Mappings)
в списке Действий (Action) которого есть пункт меню «Добавить модульный обработчик» (Add Module Mapping). Заполните форму как на скриншоте и нажмите кнопку «Запрос ограничения» (Request Restrictions…)
Выберите вариант «Файл или папка» (File or folder)
Нажмите ОК, потом снова ОК на форме модульного обработчика и подтвердите создание действия
В списке обработчиков должен появиться только что созданный:
Теперь добавим настройку на уровне веб-сервера, чтобы файл index.php открывался в качестве страницы по умолчанию.
Для этого в меню сервера (а не сайта) открываем «Документ по умолчанию» (Default document),
выбираем в списке действий «Добавить» (Add), заполняем поле Имя (Name) значением index.php и жмем ОК
Полученный результат
Для применения всех настроек необходимо перезапустить веб сервер. Для этого остановим его
и запустим
Интеграция веб-сервера с PHP настроена.
Давайте проверим работу PHP скрипта. Для этого в корневой папке сайта создадим файл с именем index.php, откроем его в блокноте и добавим такое содержимое
<?php
phpinfo();
?>
Сохраним файл и обновим в браузере сайт «http://domain.name/»
Должна отобразиться такая страница
Это значит, что PHP скрипты успешно обрабатываются веб-сервером.
В данной статье мы научились устанавливать на Windows Server 2012-2019 веб-сервер IIS, выполнять первоначальные настройки, интегрировать с установленным ранее PHP и создавать отдельный сайт в IIS Manager.
В статье расскажем, как установить службу Internet Information Services (IIS) на серверы с операционной системой Windows Server 2019. Инструкция подойдет и для ОС Windows Server 2016.
IIS (Internet Information Services) — набор сервисов от компании Microsoft для работы веб-сервера и других интернет служб. IIS устанавливается на сервер и работает с протоколами HTTP/HTTPS, POP3, SMTP, FTP, NNTP.
Чтобы приступить к установке, зайдите на сервер с правами администратора.
«Диспетчер серверов» (Server Manager) будет уже запущен (запускается автоматически при старте ОС) или запустите его вручную из меню «Пуск».
То же самое можно сделать через панель «Локальный сервер» (Local Server) — «Управление» (Manage).
Выберите тип установки «Установка ролей или компонентов» (Role-based or feature-based installation) и нажмите «Далее» (Next).
Выберите сервер из пула серверов (Select a server from the server pool) и отметьте имя вашего сервера. Нажмите «Далее» (Next).
Обратите внимание, что служба FTP по умолчанию не устанавливается. Если в дальнейшем вам понадобятся новые роли, то вы сможете их добавить без переустановки IIS.
При необходимости отметьте «Автоматический перезапуск конечного сервера» (Restart the destination server automatically if required), если пункт не выбран, то перезагрузите сервер самостоятельно после окончания установки.
Запустите «Диспетчер серверов» (Server Manager) из меню «Пуск» (Start).
В списке содержимого появится установленная служба IIS.
Панель «Просмотр возможностей» (Features View)
Возможности, доступные вам в службе IIS, перечислены на панели Просмотр возможностей (Features View). Отсюда управляйте возможностями IIS, настраивайте и перезапускайте. Например, настройте SSL-сертификаты.
Сразу после установки IIS по умолчанию создается пустой сайт Default Web Site.
Добавьте сайты, которые будут обслуживаться этим веб-сервером. Для этого в контекстном меню пункта «Сайты» (Sites) на вкладке «Подключения» (Connections) выберите «Добавить сайт» (Add Website).
Заполните поля формы данными о сайте и нажмите ОК.
В списке сайтов IIS появится только что добавленный.
Этот материал был полезен?
Posted by
on December 19, 2018
Here we’re going to show you how to install the Internet Information Services (IIS) web server version 10.0 in Microsoft’s Windows Server 2019 operating system.
This can be done both with PowerShell or through the GUI, we’ll cover both methods here.
Install IIS With PowerShell
If you don’t have the GUI installed or just want to use the PowerShell command line interface (CLI) instead, follow these steps. This method is a lot faster than going through all of the GUI options.
- Open PowerShell with administrative privileges and run the Install-WindowsFeature cmdlet as shown below.
Install-WindowsFeature -name Web-Server -IncludeManagementTools
Here we include the management tools so that you can manage IIS on this server, as these are generally installed when using the GUI, making this PowerShell command equivalent with the GUI method below. If you do not plan on managing IIS through this server then you may prefer to not include this option.
- Once the installation has succeeded, you’ll be returned to the PowerShell prompt. At this point IIS should be running on port 80 by default with the firewall rule “World Wide Web Services (HTTP Traffic-In)” enabled in Windows firewall automatically.
- We can perform a simple test by opening up a web browser and browsing to the server that we have installed IIS on. You should see the default IIS page.
Install IIS Through GUI
If your server has the graphical user interface component installed you can also install IIS by following these steps.
- Open Server Manager, this can be found in the start menu. If it’s not there simply type “Server Manager” with the start menu open and it should be found in the search.
- Click the “Add roles and features” text.
- On the “Before you begin” window, simply click the Next button.
- On the “Select installation type” window, leave “Role-based or feature-based installation” selected and click Next.
- As we’re installing to our local machine, leave “Select a server from the server pool” with the current machine selected and click Next. Alternatively you can select another server that you are managing from here, or a VHD.
- From the “Select server roles” window, check the box next to “Web Server (IIS)”. Doing this may open up a new window advising that additional features are required, simply click the “Add Features” button to install these as well. Click Next back on the Select server roles menu once this is complete.
- We will not be installing any additional features at this stage, so simply click Next on the “Select features” window.
- Click Next on the “Web Server Role (IIS)” window after reading the information provided.
- At this point on the “Select role services” window you can install additional services for IIS if required. You don’t have to worry about this now as you can always come back and add more later, so just click Next for now to install the defaults.
- Finally on 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.
No reboot should be required with a standard IIS installation, however if you remove the role a reboot will be needed.
- Once the installation has succeeded, click the close button. At this point IIS should be running on port 80 by default with the firewall rule “World Wide Web Services (HTTP Traffic-In)” enabled in Windows firewall automatically.
- We can perform a simple test by opening up a web browser and browsing to the server that we have installed IIS on. You should see the default IIS page.
As you can hopefully see, it’s quite a lot faster to use PowerShell to perform the same task.
Summary
As shown we can easily install the IIS web server in Windows Server 2019 with both the PowerShell command line or the graphical user interface.
In this part of the Windows Tutorials, we want to teach you How To Set up IIS on Windows Server 2019.
The term “IIS” stands for Internet Information Services, which is a general-purpose webserver that runs on the Windows operating system.
It hosts the applications, websites, and other standard services needed by users and allows developers to make websites, applications, and virtual directories to share with their users.
To install IIS on your Windows server 2019 follow the steps below.
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 the 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 2019:
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 on Windows Server 2019
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:
http://server-ip-address
If you see this page means that you have set up IIS on your Windows server 2019 correctly.
Conclusion
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 IIS on your Windows server.
Hope you enjoy it.
How to Install IIS Web Server on Windows Server 2019. IIS Web Server is for Windows Server that can be installed on different versions of Windows. IIS Web Server allows Windows to respond to web requests.
The IIS web server has fewer users than Apache and Nginx, which may be due to slower speeds.
IIS stands for Internet Information Server. IIS is a web server-dependent Visual Basic application that responds to a browser request.
In this article, we will teach you how to install IIS Web Server on Windows Server 2019.
1) Open Server Manager
You have to go to the Server Manager to begin the installation. Hit your Windows key and search for the Server Manager.
Once open, click on Add Roles and Features.
On the first page of the Add Roles and Features Wizard, click Next.
2) Installation Type
In the Select Installation type page, select Role-based or feature-based installation and click Next.
3) Destination Server
Select the server you will install NFS on and click Next.
4) Server Roles
In the Select server roles section, check WebServer (IIS) in the middle window.
5) Features
In the pop-up window, click on Add Features then hit Next.
After that click Next on the next three consecutive windows as illustrated below:
*
**
***
6) Confirmation
On the Confirm installation selections page click on Install.
Afford it some time to finish after which you just click Close.
*
7) Prove the Web Server is running
Open your browser either within the server or on a computer that can access your IIS Server network and input its IP Address on the browser’s search as shown below:
This is where the IIS Webserver installation was completed successfully. In the following articles, we will teach you how to configure IIS Webserver in Windows Server 2019.
Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.
