Browse Source

include sudo that was missing

pull/1/head
Craig Stewart 3 years ago
parent
commit
f009dd48bd
  1. 6
      guides/building-a-git-repo/installweb.html

6
guides/building-a-git-repo/installweb.html

@ -104,18 +104,18 @@ sudo apache2ctl restart</pre>
<p>This installs apache and certbot, but disables the default webserver, which we do not need, and creates the one we do. Note that the ridirect to the https version of the site will not work as that is not yet enabled. Until we enable the ssl module it will remain that way. But we need the SSL certs first, and that is what certbot is for.</p>
<p>Before we get our free SSL cert we want to control how it validates that we own the domain we are requesting a certificate for, and then we want to request our certificate.</p>
<pre>sudo mkdir /root/certbot
cat << EOF | tee -a /root/certbot/auth.sh > /dev/null
cat << EOF | sudo tee -a /root/certbot/auth.sh > /dev/null
#!/bin/bash
mkdir -p /var/www/acme-challenge
echo $CERTBOT_VALIDATION > /var/www/acme-challenge/$CERTBOT_TOKEN
EOF
sudo chmod u+x /root/certbot/auth.sh
cat << EOF | tee -a /root/certbot/clean.sh > /dev/null
cat << EOF | sudo tee -a /root/certbot/clean.sh > /dev/null
#!/bin/bash
rm -f /var/www/acme-challenge/$CERTBOT_TOKEN
EOF
sudo chmod u+x /root/certbot/clean.sh
cat << EOF | tee -a /root/certbot/renew.sh > /dev/null
cat << EOF | sudo tee -a /root/certbot/renew.sh > /dev/null
#!/bin/bash
/usr/bin/service apache2 restart
EOF

Loading…
Cancel
Save