Server/HTTPS (SSL|TLS)
[HTTPS] mkcert를 활용한 localhost 환경에서 SSL 설정
HoZang
2022. 2. 16. 14:43
[HTTPS] mkcert를 활용한 localhost 환경에서 SSL 설정
chocolatey 설치
# Get-ExecutionPolicy 실행
$ Get-ExecutionPolicy
# Restricted라면 AllSigned나 Bypass로 설정
# ExcutionPolicy를 AllSigned로 설정
$ Set-ExecutionPolicy AllSigned
# ExcutionPolicy를 Bypass로 설정
$ Set-ExecutionPolicy Bypass -Scope Process
# 설치!
$ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# 확인
$ choco
mkcert 설치
choco install mkcert
인증서 생성
mkcert localhost domain2.localhost
Created a new certificate valid for the following names 📜
- "localhost"
- "domain2.localhost"
The certificate is at "./localhost+1.pem" and the key at "./localhost+1-key.pem"
https://dev.to/everylearning/localhost-ssl-55oe