jvvan / reverseproxy

Reverse Proxy API powered by Nginx.
MIT License
13 stars 1 forks source link

Certs are not auto renewed #9

Closed anondev-sudo closed 2 years ago

anondev-sudo commented 2 years ago

Hi, I recently get email from let's encrypt that certs will expire soon that were created using this. When I manually run certbot renew it throws errors that it can't complete the challenge (404 error). I think that it can't renew it because there is reverse proxy and files are not located in some directory, certs for pterodactyl and controlpanel is normally auto renewed.

I used certbot certonly --nginx -d domain.com to manually renew the certs.

jvvan commented 2 years ago

You can now use the auto-renew feature provided by certbot if you have the v1.1.0 version installed.

anondev-sudo commented 2 years ago

How to use it?

anondev-sudo commented 2 years ago

When I run certbot renew I get this kind of errors:

It can't reach the challenge because the sites are proxied, not pointed to directory in /var/www

jvvan commented 2 years ago

Did you update and run the migrate script? After that restart nginx.

anondev-sudo commented 2 years ago

Did you update and run the migrate script? After that restart nginx.

I did this

anondev-sudo commented 2 years ago

Must /var/www/html be empty? I have there site that is as default server on nginx (displayed on the ip of vps)

anondev-sudo commented 2 years ago

I assume that it failed to renew because ACME-challenge location is not in 443 server (ssl) block in the template nginx config. image

Got it from https://rajeeshknambiar.wordpress.com/2021/05/08/letsencrypt-certificate-renewal-nginx-with-reverse-proxy/

anondev-sudo commented 2 years ago

@j122j Check my messages above.

Also question: For what purpose can be streams used? Can it be used to connect custom domain to MongoDB and other databases hosted on ptero?