# Rigenerazione delle chiavi Let'sEncrypt da dietro nginx

**URL:** <https://meta.discourse.org/t/regenerating-letsencrypt-keys-from-behind-nginx/95884>\
**Category:** Self-hosting\
**Created:** [29 Agosto 2018, 1:57am UTC](https://meta.discourse.org/t/regenerating-letsencrypt-keys-from-behind-nginx/95884 "2018-08-29T01:57:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mogu](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mogu](https://meta.discourse.org/u/mogu)\
**Post date:** [29 Agosto 2018, 2:46am UTC](https://meta.discourse.org/t/regenerating-letsencrypt-keys-from-behind-nginx/95884/3 "2018-08-29T02:46:21Z")

</div>

Thanks for the advice! I solved this by:

- going to the nginx configuration file and removing the entire `server { listen 443 ... }` block I had gotten from the above guide
- running `sudo certbot` and enabling LetsEncrypt for the site.

I had tried this before, but gave up on it because certbot was giving me an error. Turns out this was because I was running an old version of certbot. Upgrading it with `sudo apt update; sudo apt upgrade` fixed the issue.

So in short, the advice at the above link is incorrect. Just take the port 80 block in `/etc/nginx/sites-available/discourse.conf`, and let certbot handle the SSL stuff.

---

_[View the full topic](https://meta.discourse.org/t/regenerating-letsencrypt-keys-from-behind-nginx/95884)._
