<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2017-04-25:3165654</id>
  <title>Kevin Reid's blog</title>
  <subtitle>Kevin Reid</subtitle>
  <author>
    <name>Kevin Reid</name>
  </author>
  <link rel="alternate" type="text/html" href="https://kpreid.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://kpreid.dreamwidth.org/data/atom"/>
  <updated>2018-06-28T18:06:12Z</updated>
  <dw:journal username="kpreid" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2017-04-25:3165654:53011</id>
    <link rel="alternate" type="text/html" href="https://kpreid.dreamwidth.org/53011.html"/>
    <link rel="self" type="text/xml" href="https://kpreid.dreamwidth.org/data/atom/?itemid=53011"/>
    <title>HTTPS, finally</title>
    <published>2018-06-28T17:43:13Z</published>
    <updated>2018-06-28T18:06:12Z</updated>
    <category term="security"/>
    <category term="apache"/>
    <category term="web site"/>
    <category term="web"/>
    <category term="meta"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;In further news of updating my personal web presence, I have finally set up HTTPS for &lt;a href="https://switchb.org/kpreid/"&gt;switchb.org&lt;/a&gt;. As I write this I'm working on updating all the links to it that I control.

&lt;p&gt;The thing I found underdocumented in Let's Encrypt/Certbot is: if you want to (or must) manually edit the HTTP configuration, what should the edits be? What I concluded was:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:443&amp;gt;
  ServerName &lt;var&gt;YOUR DOMAIN NAME&lt;/var&gt;
  Include /etc/letsencrypt/options-ssl-apache.conf
  SSLCertificateFile /etc/letsencrypt/live/&lt;var&gt;YOUR DOMAIN OR CERT NAME&lt;/var&gt;/cert.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/&lt;var&gt;YOUR DOMAIN OR CERT NAME&lt;/var&gt;/privkey.pem
  SSLCertificateChainFile /etc/letsencrypt/live/&lt;var&gt;YOUR DOMAIN OR CERT NAME&lt;/var&gt;/chain.pem

  &lt;var&gt;...rest of configuration for this virtual host...&lt;/var&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notes:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/etc/letsencrypt/options-ssl-apache.conf&lt;/code&gt; (which of course may be in a different location depending on your OS and package manager) contains the basic configuration to enable SSL (&lt;code&gt;SSLEngine on&lt;/code&gt;) and certbot-recommended cipher options.
&lt;li&gt;You have to have a separate VirtualHost entry for *:443 and *:80; there's no way to copy the common configuration as far as I heard.
&lt;li&gt;By "&lt;var&gt;CERT NAME&lt;/var&gt;" I mean the name assigned to a multi-domain-name certificate if you have requested one. You can find out the certificate names with the command &lt;kbd&gt;certbot certificates&lt;/kbd&gt;. For a single domain it will be identical to the domain name.
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=kpreid&amp;ditemid=53011" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
