Let’s EncryptでwebサーバーをSSL化して自動更新までさせるといった情報はサイトで多数みつける事ができるけど、ダイナミックDNSでの作業が面倒で何度も失敗したりでGive-up寸前のところで見つけた情報が「Windows版CerbotでSSL化」、早速試したところ超簡単15分程度でLetsencrypt証明書を取得できた。

-Let’s Encrypt-
【Certbot – Windows Apache】
Automatically enable HTTPS on your website with EFF’s Certbot, deploying Let’s Encrypt certificates.
① Letsencryptの証明書取得準備
WordPressのインストールが終了した後、直ちに「Windows版Cerbot」をCerbot.eff.orgよりダウンロードしてインストール。
1.管理者モードでコマンドプロンプトを起動して、certbot.exe が入っているフォルダまで移動する。
2.SSL証明書を取得する際Let’s EncryptがWebサーバーの所在確認をするのでApacheを停止させる。
② 準備が完了後、管理者モードのコマンドプロンプトでCerbotを起動
cd C:\Program Files (x86)\Certbot\binに移動して
「C:\Program Files (x86)\Certbot\bin > 「certbot.exe certonly」で「Enter」
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): xxxxxxxxxx@gmail.com
You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Account registered.
Please enter in your domain name(s) (comma and/or space separated) (Enter 'c'
to cancel): osshinet.com
Successfully received certificate.
Certificate is saved at:
Key is saved at:
*自宅サーバドメイン用、次にサイト用の(www)を取得
-LetsencryptでSSL化-
Cerbot.eff.orgからダウンロードしたCerbotでLetsencryptのSSL証明書取得
「success」と返答が加えらるとC:\に「Certbot」が出来ている。内容の確認した後にApacheのConf/extra内にあるhttpd-vhosts.confの最後の行に下記を追記する。
<VirtualHost *:80>
ServerAdmin webmaster@osshinet.com
DocumentRoot "C:/xampp/htdocs/wordpress"
ServerName osshinet.com
ServerAlias www.osshinet.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
<Directory c:\htdocs\wordpress>
Options FollowSymlinks Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@osshinet.com
DocumentRoot "C:/xampp/htdocs/wordpress"
ServerName www.osshinet.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
SSLEngine on
SSLCertificateFile "C:\Certbot\live\www.osshinet.com\cert.pem"
SSLCertificateKeyFile "C:\Certbot\live\www.osshinet.com\privkey.pem"
<Directory c:\htdocs\wordpress>
Options FollowSymlinks Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
*「Xampp Panel」をオープン、Apache、MySQLをスタートして終了。
Let’s Encrypt証明書は3ヵ月の有効期限付きなので、管理者モードでコマンドプロンプトを立ち上げ、「certbot renew」を実行することで証明書の期限が更新される。