How to install and use IIS on Windows Server 2019
Microsoft's new release of Windows Server 2019 comes with IIS 10. This guide will show you how to install and use IIS on Windows Server 2019.
Install IIS on Windows Server 2019
Step 1. Run Powershell as admin and install IIS.
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # install IIS with admin tools PS C:UsersAdministrator> Install-WindowsFeature Web-Server -IncludeManagementTools Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True No Success {Common HTTP Features, Default Document, D. # verify running to access to default web site PS C:UsersAdministrator> Invoke-WebRequest http://localhost StatusCode : 200 StatusDescription : OK Content : ; outerText=; tagName=A; href=http://go.microsoft.com/fwlink/?linkid=66138&clcid=0x409}} ParsedHtml : System.__ComObject RawContentLength : 703
Step 2. Run Server Manager and click Add roles and features .
Step 3. Click the Next button .
Step 4. Select Role-based or feature-based installation .
Step 5. Select the host you want to add services to.
Step 6. Check the box for Web Server (IIS) .
Step 7. Additional features are required to add IIS Server. Click the Add Features button > Next .
Step 8. Click the Next button .
Step 9. Click the Next button .
Step 10. This is the selection of Web Server features. Select the features you want to add. In this example, the default options are preserved. Of course, you can add these features after you install IIS.
Step 11. Click the Install button .
Step 12. After finishing the installation, click the Close button .
Step 13. Run your web browser and go to localhost , then you can verify if IIS is running normally.
Using IIS on Windows Server 2019
Step 1. Run Powershell with admin rights and configure the following:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # show Sites list : [Default Web Site] is only set PS C:UsersAdministrator> Get-Website Name ID State Physical Path Bindings ---- -- ----- ------------- -------- Default Web Site 1 Started %SystemDrive%inetpubwwwroot http *:80: # [Physical Path] is the Document Root PS C:UsersAdministrator> Get-ChildItem C:inetpubwwwroot Directory: C:inetpubwwwroot Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 8/27/2019 6:57 PM 703 iisstart.htm -a---- 8/27/2019 6:57 PM 99710 iisstart.png # verify accesses : [iisstart.htm] responds PS C:UsersAdministrator> Invoke-WebRequest localhost StatusCode : 200 StatusDescription : OK Content : Get-WebConfigurationProperty -Filter "//defaultDocument/files/add" -PSPath "IIS:SitesDefault Web Site" -Name "value" | select value Value ----- Default.htm Default.asp index.htm index.html iisstart.htm # create a test page under the Document Root and verify working # [Write-Output] generates with UTF-16, so specify encoding explicitly with [Out-File] PS C:UsersAdministrator> Write-Output "IIS Default Start Page" | Out-File C:inetpubwwwrootDefault.htm -Encoding Default # verify accesses # for [curl.exe], specify extension ⇒ if not specify extension, [curl] is an Alias from [Invoke-WebRequest] PS C:UsersAdministrator> curl.exe localhost IIS Default Start Page
Step 2. Run Start> Server Manager and click Tools> Internet Information Services (IIS) Manager .
Step 3. Open items in the left panel, Default Web Site is configured.
Step 4. Select Default Web Site and click Advanced Settings . , then you can confirm settings such as Physical Path (Document Root) , etc.
Step 5. Open Default Document , then can confirm the default document.
Step 6. You can see the default documents.
Step 7. Create a test page in Physical Path (Document Root) and verify permissions using a web browser.
Hope you are succesful.
You should read it
- How to install DNS Server on Windows Server 2019
- Instructions for installing SQL Server 2019
- How to install a VPN on Windows Server 2019
- How to install Active Directory on Windows Server 2019
- Introducing Exchange Server 2019, how to install Exchange Server 2019
- How to install IIS in Windows Server 2012
- Download Windows Server 2019 and discover new features
- How to install iSCSI Target on Windows Server 2019
- SQL Server 2019 - Microsoft Relational Database Management System
- Microsoft added recovery, backup, security for Windows Server 2019
- How to initial setup Windows Server 2019
- Top 10 security improvements in Windows Server 2019
Maybe you are interested
Basic steps to build self-confidence in children
4 Security Steps to Follow When Using Remote Access Applications
7 steps to take when your phone is stolen
8 steps to fix sound loss problem in Windows
A steppe kestrel kills a mallard with a 'shadowless' dive at a speed of 90km/h
Google changes the way 2-step verification is set up on user accounts