BE/OS
[ Window ] IIS Angular / Node.js 배포 세팅
HEON.D
2023. 12. 13. 13:56
1. Application Pool 해제
asp 방식이 아닌 none으로
2. URL Rewrite 모듈 추가
https://www.iis.net/downloads/microsoft/url-rewrite
3. web.config 파일 추가
https://angularindepth.com/posts/1239/deploy-an-angular-application-to-iis
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="./index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
관련영상
https://www.youtube.com/watch?v=yrUCWuPAmS8&t=235s
https://www.youtube.com/watch?v=KQMHCXF5aew
https://www.youtube.com/watch?v=dPlv_LaBVT8&t=598s
https://www.youtube.com/watch?v=0XR3quuqth0&t=583s