Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Add section on using webroot
Browse files Browse the repository at this point in the history
Add  section on using webroot to serve the acme challenge rather than the apache plugin for those configs for which the apache plugin will not work.
  • Loading branch information
rexbron authored Apr 5, 2020
1 parent 0a03dd0 commit 7c29bae
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions general/networking/letsencrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Once the packages are installed, you're ready to generate a new certificate.

### Apache

#### Certbot Apache Plugin
After installing Certbot and the Apache plugin, certificate generation is accomplished by with the following command.

```sh
Expand All @@ -27,6 +28,23 @@ Add a job to cron so the certificate will be renewed automatically.
echo "0 0 * * * root certbot renew --quiet --no-self-upgrade --post-hook 'systemctl reload apache2'" | sudo tee -a /etc/cron.d/renew_certbot
```

#### Certbot Webroot
##### Debian
If the certbot apache plugin doesn't work with your config, use webroot instead.

Add the following to your <VirtualHost> section after configuring it a reverse proxy:

```conf
DocumentRoot /var/www/html/
#Do not pass the .well-known directory when using certbot and webroot
ProxyPass /.well-known !
```
Run the certbot command as root:

```sh
sudo certbot certonly --webroot -w /var/www/html --agree-tos --email YOUR_EMAIL -d DOMAIN_NAME
```

### HAProxy

HAProxy doesn't currently have a Certbot plugin. To get around this, run Certbot in standalone mode and proxy traffic through your network.
Expand Down

0 comments on commit 7c29bae

Please sign in to comment.