<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ssl | 志摩市のパソコン屋 | One&amp;Only</title>
	<atom:link href="https://www.oaopc.com/tag/ssl/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.oaopc.com</link>
	<description>パソコンから、ものづくりまで。志摩市の暮らしにデジタルな便利さを。</description>
	<lastBuildDate>Sat, 02 May 2020 08:51:27 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.oaopc.com/wp-content/uploads/2021/01/akd37-r41bs-100x100.png</url>
	<title>ssl | 志摩市のパソコン屋 | One&amp;Only</title>
	<link>https://www.oaopc.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">188148420</site>	<item>
		<title>無料でSSL(Let&#8217;s Encrypt)化</title>
		<link>https://www.oaopc.com/ssl-lets-encrypt/</link>
					<comments>https://www.oaopc.com/ssl-lets-encrypt/#respond</comments>
		
		<dc:creator><![CDATA[Kebarhythm]]></dc:creator>
		<pubDate>Sat, 02 May 2020 08:51:20 +0000</pubDate>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[備忘録]]></category>
		<guid isPermaLink="false">https://www.morien.mydns.jp/?p=1557</guid>

					<description><![CDATA[<p>このサイトのSSL化は必要ないだろうといままでスルーしてきました。ふと気になって少しばかりネット検索してみところApacheだったらほぼ自動でSSL化ができるようなので、バックアップとっていっちょやってみました。 まず必 [&#8230;]</p>
The post <a href="https://www.oaopc.com/ssl-lets-encrypt/">無料でSSL(Let’s Encrypt)化</a> first appeared on <a href="https://www.oaopc.com">志摩市のパソコン屋 | One&Only</a>.]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">このサイトのSSL化は必要ないだろうといままでスルーしてきました。<br>ふと気になって少しばかりネット検索してみところApacheだったらほぼ自動でSSL化ができるようなので、バックアップとっていっちょやってみました。</p>



<span id="more-1557"></span>



<p class="wp-block-paragraph">まず必要なパッケージをインストールします。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo apt install certbot
sudo apt install python-certbot-apache
</pre></div>


<p class="wp-block-paragraph">後はコマンドを実行するだけ。<br>設定されているServerNameを取ってくるようなのでそこは確認しときます。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; highlight: [4,5,13,21,27,28,45]; title: ; notranslate">
pi@raspberry:~ $ sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter &#039;c&#039; to
cancel): pi@example.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at

<a rel="noopener" href="https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf." title="404 Page not found" class="blogcard-wrap external-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img fetchpriority="high" decoding="async" src="https://www.oaopc.com/wp-content/uploads/cocoon-resources/blog-card-cache/42dcd0ec02488feeb1659f650a7a16e0.png" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="320" height="180" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">404 Page not found</div><div class="blogcard-snippet external-blogcard-snippet">Let&#039;s Encrypt is a free, automated, and open Certificate Authority brought to you by the nonprofit Internet Security Res...</div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://letsencrypt.org/404.html" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">letsencrypt.org</div></div></div></div></a> You must
agree in order to register with the ACME server at

<a rel="noopener" href="https://acme-v02.api.letsencrypt.org/directory" title="https://acme-v02.api.letsencrypt.org/directory" class="blogcard-wrap external-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img decoding="async" src="https://s.wordpress.com/mshots/v1/https%3A%2F%2Facme-v02.api.letsencrypt.org%2Fdirectory?w=320&#038;h=180" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="320" height="180" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">https://acme-v02.api.letsencrypt.org/directory</div><div class="blogcard-snippet external-blogcard-snippet"></div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://acme-v02.api.letsencrypt.org/directory" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">acme-v02.api.letsencrypt.org</div></div></div></div></a>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let&#039;s Encrypt project and the non-profit
organization that develops Certbot? We&#039;d like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: N

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: www.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter &#039;c&#039; to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.example.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you&#039;re confident your site works on HTTPS. You can undo this
change by editing your web server&#039;s configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number &#x5B;1-2] then &#x5B;enter] (press &#039;c&#039; to cancel): 1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://www.example.com

You should test your configuration at:

<a rel="noopener" href="https://www.ssllabs.com/ssltest/analyze.html?d=www.example.com" title="SSL Server Test (Powered by Qualys SSL Labs)" class="blogcard-wrap external-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img loading="lazy" decoding="async" src="https://s.wordpress.com/mshots/v1/https%3A%2F%2Fwww.ssllabs.com%2Fssltest%2Fanalyze.html%3Fd%3Dwww.example.com?w=320&#038;h=180" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="320" height="180" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">SSL Server Test (Powered by Qualys SSL Labs)</div><div class="blogcard-snippet external-blogcard-snippet">A comprehensive free SSL test for your public web servers.</div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://www.ssllabs.com/ssltest/analyze.html?d=www.example.com" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">www.ssllabs.com</div></div></div></div></a>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/www.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/www.example.com/privkey.pem
   Your cert will expire on 2020-07-27. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the &quot;certonly&quot; option. To non-interactively renew *all* of
   your certificates, run &quot;certbot renew&quot;
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let&#039;s Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

</pre></div>


<p class="wp-block-paragraph">対話形式なので質問に答えていくだけでSSL証明書発行とapacheのSSL設定が終了します。</p>



<p class="wp-block-paragraph">リダイレクトの選択では、いきなりhttpsでしか接続できなくなると何かトラブルがあった時に解決するまでの間ダウンしてしまうので『1: No redirect』を選択しました。問題なく接続できることを確認してから[.htaccess]ファイルの先頭にリダイレクトを追加します。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} &#x5B;R=301,L]
&amp;lt;/IfModule&gt;

# BEGIN WordPress
...
</pre></div>


<p class="wp-block-paragraph">Let’s Encrypt証明書の有効期限は90日で期限まで残り1ヶ月になると更新処理が行えます。それ以前に更新処理をしてもスキップされるだけなので定期的に更新処理をしておきましょう。<br>cronで週に1回実行するように登録。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
0 1 * * 7 certbot renew
</pre></div>


<p class="wp-block-paragraph">個々の環境に合わせてルーターのポートを開けたり、ファイアウォールの設定をしたりと他の作業も必要だけど、SSL化がここまで簡素化されてるならさっさとやっておいた方がいいように思いました。</p>The post <a href="https://www.oaopc.com/ssl-lets-encrypt/">無料でSSL(Let’s Encrypt)化</a> first appeared on <a href="https://www.oaopc.com">志摩市のパソコン屋 | One&Only</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.oaopc.com/ssl-lets-encrypt/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1557</post-id>	</item>
	</channel>
</rss>
