Simple steps to host a website in IIS. This can be used to host ks.cfg file for ESXi scripted installation.
1 x Server 2012
- (Server 2012) Server Manager –> Add Roles and Features –> Select Web Server (IIS) –> Select Optional features such as FTP server, IIS hostable web core etc., –> Install.
- Create folder inside C:\inetpub\wwwroot\ and name it kickstart. The folder structure is automatically created while installing the IIS role. Place the finalized ks.cfg file inside kickstart folder.
- Open IIS manager. Right click the Default web site –> Add virtual directory. Specify physical path as C:\inetpub\wwwroot\kickstart
- Select Default web site –> Bindings from actions pane –> Choose appropriate IP and host name for the website. Optionally add A record in DNS for this name and IP.
- Double-click the MIME Types feature icon. In the Actions pane, click Add. Fill the “File Name Extension” box with * and the MIME Type box with “application/octet-stream” (without quotes).
- Test the access by browsing the file http://<ipaddr or URL>/kickstart/ks.cfg and file should be accessible.