let's encryptにしてみた 1
2017.05.03
今まで使っていたStartComさんが
いろいろやらかしているので、ルート証明がころころ変わって面倒なので、
この度、let's encryptデビューしました!
うちのサーバー環境がwindowsなので↓を参考に
IISでLet's Encrypt を利用してSSLサイトを構築する (letsencrypt-win-simple クライアントを利用)
SubjectAltName(SAN)も使っていいるので
おきつねさまのひまこみゅ: Let's Encrypt を・・・
見ればすぐわかるけど、上記2つともIISのお話ですが、
うちで使っているのは04webserver!!
もちろん letsencrypt-win-simple が、自動で設定を読み込んでくれるわけもなく
仕方がないので手動で行いました。
以下コマンド
c:\[letsencrypt作業ディレクトリ]>letsencrypt --san <=SAN使うので[--san]追加
The global logger has been configured
Let's Encrypt (Simple Windows ACME Client)
Renewal Period: 60
Certificate Store: WebHosting
ACME Server: https://acme-v01.api.letsencrypt.org/
Config Folder: C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org
Certificate Folder: C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org
Loading Signer from C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\Signer
Getting AcmeServerDirectory
Loading Registration from C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\Reg
istration
Scanning IIS Sites
IIS Version not found in windows registry. Skipping scan.
No targets found.
W: Generate a certificate via WebDav and install it manually.
S: Generate a single San certificate for multiple sites. <=[--san]使うと現れる
F: Generate a certificate via FTP/ FTPS and install it manually.
M: Generate a certificate manually.
A: Get certificates for all hosts
Q: Quit
Choose from one of the menu options above: M <=マニュアルで
Enter a host name: expouch.net <=コモンネームになる
Enter all Alternative Names seperated by a comma expouch.net,www.expouch.net,koge.me,5oo.jp<=コンマで区切る
Enter a site path (the web root of the host for http authentication): C:/[公開webルートディレクトリ]
Authorizing Identifier expouch.net Using Challenge Type http-01
Writing challenge answer to C:/[公開webルートディレクトリ]\.well-known/acme-challenge/XEq...[略]
Answer should now be browsable at http://expouch.net/.well-known/acme-challenge/XEq...[略]
Submitting answer
Refreshing authorization
Authorization Result: valid
...[略]
Authorizing Identifier koge.me Using Challenge Type http-01
Writing challenge answer to C:/[公開webルートディレクトリ]\.well-known/acme-challenge/xa0...[略]
Answer should now be browsable at http://koge.me/.well-known/acme-challenge/xa0...[略]
Submitting answer
Refreshing authorization
Authorization Result: invalid
Authorization Failed invalid
******************************************************************************
The ACME server was probably unable to reach http://koge.me/.well-known/acme-challenge/xa0...[略]
Check in a browser to see if the answer file is being served correctly.
******************************************************************************
...[略]
なんかエラー出た!!
http://koge.me/.well-known/acme-challenge/xa0...[略] にアクセスできんよって...
ディレクトリ指定してないしな!
仕方がないので、エイリアスに/.well-known/を追加して、
リンク先にC:/[公開webルートディレクトリ]\.well-knownを設定
とりあえずこれでやり直すと
Authorization Result: valid
Requesting Certificate
Request Status: Created
Saving Certificate to C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\expouch.net-crt.der
Saving Issuer Certificate to C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\ca-0A0141420000015385736A0B85ECA708-crt.pem
Saving Certificate to C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\expouch.net-all.pfx
Installing Non-Central SSL Certificate in the certificate store
Opened Certificate Store My
Set private key exportable
Set private key exportable
Adding Certificate to Store
Closing Certificate Store
Installing Non-Central SSL Certificate in server software
WARNING: Unable to configure server software.
Opened Certificate Store My
Closing Certificate Store
Adding renewal for Manual expouch.net (C:/[公開webルートディレクトリ])
Creating Task letsencrypt-win-simple httpsacme-v01.api.letsencrypt.org with Windows Task scheduler at 9am every day.
Do you want to specify the user the task will run as? (y/n) y
Enter the username (Domain\username): ユーザー
Enter the user's password: ****************************
Renewal Scheduled Manual expouch.net (C:/[公開webルートディレクトリ]) Renew After 2017/07/02
Press enter to continue.
長くなったので分けます。
いろいろやらかしているので、ルート証明がころころ変わって面倒なので、
この度、let's encryptデビューしました!
うちのサーバー環境がwindowsなので↓を参考に
IISでLet's Encrypt を利用してSSLサイトを構築する (letsencrypt-win-simple クライアントを利用)
SubjectAltName(SAN)も使っていいるので
おきつねさまのひまこみゅ: Let's Encrypt を・・・
見ればすぐわかるけど、上記2つともIISのお話ですが、
うちで使っているのは04webserver!!
もちろん letsencrypt-win-simple が、自動で設定を読み込んでくれるわけもなく
仕方がないので手動で行いました。
以下コマンド
c:\[letsencrypt作業ディレクトリ]>letsencrypt --san <=SAN使うので[--san]追加
The global logger has been configured
Let's Encrypt (Simple Windows ACME Client)
Renewal Period: 60
Certificate Store: WebHosting
ACME Server: https://acme-v01.api.letsencrypt.org/
Config Folder: C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org
Certificate Folder: C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org
Loading Signer from C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\Signer
Getting AcmeServerDirectory
Loading Registration from C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\Reg
istration
Scanning IIS Sites
IIS Version not found in windows registry. Skipping scan.
No targets found.
W: Generate a certificate via WebDav and install it manually.
S: Generate a single San certificate for multiple sites. <=[--san]使うと現れる
F: Generate a certificate via FTP/ FTPS and install it manually.
M: Generate a certificate manually.
A: Get certificates for all hosts
Q: Quit
Choose from one of the menu options above: M <=マニュアルで
Enter a host name: expouch.net <=コモンネームになる
Enter all Alternative Names seperated by a comma expouch.net,www.expouch.net,koge.me,5oo.jp<=コンマで区切る
Enter a site path (the web root of the host for http authentication): C:/[公開webルートディレクトリ]
Authorizing Identifier expouch.net Using Challenge Type http-01
Writing challenge answer to C:/[公開webルートディレクトリ]\.well-known/acme-challenge/XEq...[略]
Answer should now be browsable at http://expouch.net/.well-known/acme-challenge/XEq...[略]
Submitting answer
Refreshing authorization
Authorization Result: valid
...[略]
Authorizing Identifier koge.me Using Challenge Type http-01
Writing challenge answer to C:/[公開webルートディレクトリ]\.well-known/acme-challenge/xa0...[略]
Answer should now be browsable at http://koge.me/.well-known/acme-challenge/xa0...[略]
Submitting answer
Refreshing authorization
Authorization Result: invalid
Authorization Failed invalid
******************************************************************************
The ACME server was probably unable to reach http://koge.me/.well-known/acme-challenge/xa0...[略]
Check in a browser to see if the answer file is being served correctly.
******************************************************************************
...[略]
なんかエラー出た!!
http://koge.me/.well-known/acme-challenge/xa0...[略] にアクセスできんよって...
ディレクトリ指定してないしな!
仕方がないので、エイリアスに/.well-known/を追加して、
リンク先にC:/[公開webルートディレクトリ]\.well-knownを設定
とりあえずこれでやり直すと
Authorization Result: valid
Requesting Certificate
Request Status: Created
Saving Certificate to C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\expouch.net-crt.der
Saving Issuer Certificate to C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\ca-0A0141420000015385736A0B85ECA708-crt.pem
Saving Certificate to C:\[ユーザーディレクトリ]\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\expouch.net-all.pfx
Installing Non-Central SSL Certificate in the certificate store
Opened Certificate Store My
Set private key exportable
Set private key exportable
Adding Certificate to Store
Closing Certificate Store
Installing Non-Central SSL Certificate in server software
WARNING: Unable to configure server software.
Opened Certificate Store My
Closing Certificate Store
Adding renewal for Manual expouch.net (C:/[公開webルートディレクトリ])
Creating Task letsencrypt-win-simple httpsacme-v01.api.letsencrypt.org with Windows Task scheduler at 9am every day.
Do you want to specify the user the task will run as? (y/n) y
Enter the username (Domain\username): ユーザー
Enter the user's password: ****************************
Renewal Scheduled Manual expouch.net (C:/[公開webルートディレクトリ]) Renew After 2017/07/02
Press enter to continue.
長くなったので分けます。
メモ
2017.02.04
サーバーのメンテを容易にするため
現在使っている機能を分けてみようと画策してます
今現在は{HTTP,HTTPS,POP,SMTP,DNS,TV録画変換,データ置き場,proxy,vpn}
↑これを1台でやってたので
外部用に{HTTP,HTTPS,DNS,POP,SMTP}⇒省力機+固定ipルータ
内部用に{TV録画変換,データ置き場,proxy,vpn}⇒現在機+動的ipルータ
こんな感じにしようと思います
そのうち続きメモっとくかな
現在使っている機能を分けてみようと画策してます
今現在は{HTTP,HTTPS,POP,SMTP,DNS,TV録画変換,データ置き場,proxy,vpn}
↑これを1台でやってたので
外部用に{HTTP,HTTPS,DNS,POP,SMTP}⇒省力機+固定ipルータ
内部用に{TV録画変換,データ置き場,proxy,vpn}⇒現在機+動的ipルータ
こんな感じにしようと思います
そのうち続きメモっとくかな