IIS(Internet Information Services)で自己証明書を使用してHTTPSを有効にするには、以下の手順を実施します。
Win + R
→ inetmgr
→ EnterMySelfSignedCert
)以下のコマンドを管理者権限のPowerShellで実行:
New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "Cert:\\\\LocalMachine\\\\My"
補足:
"localhost"
を実際のホスト名に変更可能NotAfter (Get-Date).AddYears(5)
を追加