Closed josh-mclean closed 7 months ago
What I do is:
Set up the application pool if needed and then use the below.
$wwwpath = "sitepath"
$iisObjectName = "sitename"
New-Website -Name $iisObjectName -ApplicationPool $iisObjectName -Force -IPAddress * -PhysicalPath "$wwwpath" -Port 80
Remove-WebSite -Name "Default Web Site"
Start-Website -Name $iisObjectName
We tried deleting as well as stopping the default website via a powershell script ran from our dockerfile.
This resulted in errors on the site and we were unable to get the site working. What is the best practice here? When using the microsoft/iis image are we required to keep the Default Web Site and put our application on it? We were able to get the site working by keeping the Default Web Site and moving our site to port 8080.
Thank you Josh