Установить роль IIS (WEB Server)
Обычный сайт
- ПКМ по серверу -> “Add Website …”
- Site Name -> имя для администрирования (название файла .conf в apache2)
- Physical Path -> где находится сайт
- Hostname -> URI сайта (test.skill39)
Удаленная настройка Windows Server CORE
- Установить ISS -> Mangement Servic или:
install-windowsfeature web-server Web-Mgmt-Service -IncludeManagementTools- regedit ->
HEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WebManagment\Server-> EnableRemoteManagment поставить 1 - Set-Service WMSVC -StartupType Automatic
- start-service WMSVC
- Сертификаты
Доступ только с определенных ip
install-windowsfeature Web-ip-Security -IncludeManagementTools
Если Gui то Web-Server (IIS) -> Web Server -> Security -> IP and Domain Restrictions- IP Address and Domain Restrictions -> Edit Feature Settings
- Access for unspecified client -> Deny # Запрещаем клиентов по умолчанию
- Add Allow Entry… -> добавляем IP или range
Аутентификация
- Установить роль Security -> Windows Authentication и URL Authentication
- Зайти в настройки сайта
- Authentication
- Выключить Anonymous Authentication
- Включить Windows Authentication
Несколько доменных имен
Если несколько Common Name Если через ASN то не надо
- нужно в bind указать Require Server Name Indication (SNI)
Необычный порт
Нужно разрешит в firewall иначе не робит ну и в bindings другой порт задать
New-NetFirewallRule -Name "IIS-8080" -DisplayName "IIS Port 8080" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 8080
Какой-то старый вариант
- Установить ISS -> Mangement Servic
- regedit ->
HEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WebManagment\Server-> EnableRemoteManagment поставить 1 - Set-Service WMSVC -StartupType Automatic
- start-service WMSVC
- Добавление сертификаты в доверенные
certutil -addstore "My" [ПУТЬ К СЕРТИФИКАТУ] - Добавление личного сертификата
certutil -p password -importPFX My c:\cert.pfx - копирование сертификатов с шары
copy \\172.28.16.2\share\* - firewall:
netsh advfirewall firewall add rule name="IIS Management" dir=in action=allow service=WMSVC
- Добавление сертификаты в доверенные