#author("2020-02-13T10:59:35+00:00","default:admin","admin")
#author("2021-12-07T00:32:02+00:00","default:admin","admin")
-[[How to get FREE SSL Certificate for Website (HTTPS) ?:https://geekflare.com/free-ssl-tls-certificate/]]

*自己署名証明書 [#wce5a33b]
-[[方法: 開発中に使用する一時的な証明書を作成する:https://docs.microsoft.com/ja-jp/dotnet/framework/wcf/feature-details/how-to-create-temporary-certificates-for-use-during-development]]

-[[Windowsで自己署名証明書を作成方法。有効期間を1年以上(5年や10年)で:https://blog.putise.com/windows%E3%81%A7%E8%87%AA%E5%B7%B1%E7%BD%B2%E5%90%8D%E8%A8%BC%E6%98%8E%E6%9B%B8%E3%82%92%E4%BD%9C%E6%88%90%E6%96%B9%E6%B3%95%E3%80%82%E6%9C%89%E5%8A%B9%E6%9C%9F%E9%96%93%E3%82%921%E5%B9%B4%E4%BB%A5/]]

*HTTPからHTTPSへのリダイレクト [#s58c2425]
-[[IISですべてのHTTPからHTTPSにリダイレクトする最良の方法:https://codeday.me/jp/qa/20181127/8523.html]]
-[[全ページをSSLにする方法(Microsoft Internet Information Services 7.0以降):https://jp.globalsign.com/support/allssl/551.html]]

*設定 [#h131c7bf]
-[[ブラウザから証明書ファイルをエクスポートするには:https://jp.globalsign.com/support/faq/562.html]]
-[[Google Chromeへ証明書ファイルをインポートするには:https://jp.globalsign.com/support/faq/558.html]]

**サーバ証明書 [#r09e03d5]
***インポート [#h018cbe2]
-[[IIS サーバ証明書は個人ストアよりWeb ホスティングストアが推奨:https://ityorozuya.hatenablog.com/entry/2020/01/04/014207]]
--サーバ証明書は個人ストアではなくWeb ホスティングストアが推奨
--違いは数の多さ
--「Web ホスティング」ストアは、多数の証明書を管理するよう設計されている

--だったら「Web ホスティング」ストアだけにすればいいじゃん。これだからMicrosoftは...

-[[Webサーバ証明書インストール手順(Microsoft IIS 8.0/8.5)更新:https://www.einspki.jp/support/manual_s/iis8_inst_renew/]]
--こっちは「個人」になってるな
--どっちが正解かもうわからん

***サーバ移行 [#s8297643]
-[[Windows環境で証明書をエクスポートする方法:https://jp.globalsign.com/support/faq/11.html]]

***サーバ証明書が消える [#a8eb2dce]
-[[IISで証明書要求の完了後にサーバ証明書の表示が消える:http://tonkun-no.hatenablog.com/entry/2018/08/30/215934]]
-[[証明書要求の完了後にサーバ証明書が消える:http://nobukoshi802.blogspot.com/2018/02/blog-post_13.html]]

-別サーバに証明書を移す場合に起きる
--移行元サーバで、証明書の登録要求をエクスポートしておく必要がある

***コンソール [#w963efee]
-[[Webサーバ証明書インストール手順(Microsoft IIS 8.0/8.5)更新:https://www.einspki.jp/support/manual_s/iis8_inst_renew/]]

*Let's Encrypt [#k2af345a]
-[[ACME クライアント実装:https://letsencrypt.org/ja/docs/client-options/]]
-[[ACMEv2 Clients:https://keychest.net/stories/acmev2-clients]]

-[[win-acme を利用してIISでLet's Encrypt を利用したSSLサイトを作成する (Windows Server Tips):https://www.ipentec.com/document/software-iis-ssl-certificate-using-win-acme]]
-[[IISでLet's Encrypt を利用してSSLサイトを構築する (letsencrypt-win-simple クライアントを利用) (Windows Server Tips):https://www.ipentec.com/document/software-iis-ssl-certificate-using-lets-encrypt]]
-[[【IIS/SSL】Windows Server 2016でLet's Encryptを設定する時の注意:https://qiita.com/nnahito/items/927389f1e7e362c2d249]]
-[[IISでLet’s Encryptを利用して無料でSSL化する:https://mebee.info/2019/09/01/post-796/]]

**Posh-ACME [#z08e00f9]
-[[[2019年度版] Let’s Encryptの証明書を使ってRD GatewayでWindowsサーバに接続:https://dev.classmethod.jp/cloud/aws/how-to-setup-rdgateway-posh-acme/]]

**ZeroSSL [#ifab793d]
-[[無料SSL(Let's Encrypt)をcPanelとZeroSSLで簡単設定して、Httpのアドレスを自動でHttpsにリダイレクトさせる方法:https://qiita.com/ShinKano/items/fcd7ce6b5ef25c155bdb]]
-[[How to create a free SSL certificate on Windows:https://medium.com/@thylux/how-to-create-a-free-ssl-certificate-on-windows-a6eab8c2e10c]]
-[[Generating and Configuring Free SSL Certs for Azure Windows IaaS Virtual Machines:https://blog.kloud.com.au/2019/04/27/generating-and-configuring-free-ssl-certs-for-azure-windows-iaas-virtual-machines/]]

-[[ZeroSSLでブラウザだけで無料の証明書(Let’s Encrypt)を取得しよう!:https://apps-gcp.com/zerossl-letsencrypt/]]

**[[SSL For Free:https://www.sslforfree.com/]] [#y4320936]
-[[Tutorial:https://www.sslforfree.com/#tutorials]]

-[[Configuring Free SSL on IIS Server:http://blog.ithadi.com/2018/01/04/configure-free-ssl-in-iis/]]

***DNS認証の場合 [#ud97ea6c]

-DNS設定後、数分待ってからコマンドプロンプトで TXT レコードの値を確認
 nslookup -q=txt _acme-challenge.***.***.***

-ファイルをダウンロードすると、以下のファイルが取得できる
--ca_bundle.crt ... 認証局(CA)の証明書
--certificate.crt ... 証明書(公開鍵)
--private.key ... 秘密鍵

-IISに証明書をインストールするために *.pfx ファイルを作成する必要がある
--OpenSSLをインストール
---[[OpenSSL を Windows にインストールする方法:https://garafu.blogspot.com/2018/07/openssl-install-windows.html]]
---[[WindowsにOpenSSLをインストールして証明書を取り扱う(基本編):https://www.atmarkit.co.jp/ait/articles/1601/29/news043.html]]

--ダウンロードしたファイルがあるフォルダにて、以下のコマンドを実行
 openssl pkcs12 -export -out "certificate_combined.pfx" -inkey "private.key" -in "certificate.crt" -certfile ca_bundle.crt

-[[Microsoft IIS SSLサーバ証明書インポート手順:https://knowledge.digicert.com/ja/jp/solution/SO26315.html]]
--上記で生成した certificate_combined.pfx をインポート


*ASP.NET Coreでの注意点 [#lb37cf7d]
-[[Configuring LetsEncrypt for ASP.NET Core and IIS:https://weblog.west-wind.com/posts/2017/sep/09/configuring-letsencrypt-for-aspnet-core-and-iis]]

-Web.config の AspNetCoreModule が有効だと、Web.config で拡張子なしファイルを通す設定をしてもNGになってしまう
 <!--
 <add name="aspNetCore" path="*" verb="*"
     modules="AspNetCoreModule"
     resourceType="Unspecified" />
 -->

*アクセスログ [#kaf76476]
-IIS形式で SSL/非SSL を判別できるようにする方法がわかっていない

-W3C形式にすれば、ポート番号が出力されるので、これでわかる


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS