Host Static Website on Windows 10 IIS
Enable IIS Feature
You may need to enable IIS first before using the app.
Create New Site
Now you can search in your apps for IIS
or Internet Information Services and run the GUI
Right click to open context menu to "Add Website..."
Configure the site name and file location
In this example, the root of the website files lives at C:\inetpub\wwwroot\mysite
. You may organize your files anyway you'd like. It's recommended that you have these files outside and above your ./User
files
Edit Host File
We must tell the #windows machine to resolve the mysite.local
domain name
Run Notepad as "Administrator" and open this file
C:\Windows\System32\drivers\etc\hosts
Add in a line at the bottom. Use the server's IP address (static or DHCP given address)
10.42.12.6:80 mysite.local
Credits
- How to install IIS (Internet Information Services) on Windows 10? (koskila.net)
- Windows Server | #09: How to Host a Website in IIS on Windows Server 2016/2019? (youtube.com)