Good afternoon. My website had letsencrypt installed, but it expired on October 4th and was not updated automatically. Now when trying to update manually with certbot renew, the update gives an error :
Attempting to renew cert (crange.ru) from /etc/letsencrypt/renewal/crange.ru.conf produced an unexpected error: Failed authorization procedure. crange.ru (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://crange.ru/.well-known/acme-challenge/QHS_bqwmudNMjKxihc_cHwzbHqqremoYrzWgVbBzYmY:
Options used in the renewal process
[renewalparams]
post_hook = service nginx reload
authenticator = webroot
installer = None
webroot_path = /var/www/html,
[[webroot_map]] crange.ru = /var/www/html www.crange.ru = /var/www/html
I created a test file in the /var/www/html/.well-known/acme-challenge folder and I manage to open it at https://domain.ru/.well-known/acme-challenge/test.html, but the same file is not available if you change the protocol to http, nginx redirects to https://domain.ru.
Apparently the problem is that certbot gets the same redirect when trying to open its file. Tell me, what needs to be changed in the nginx settings to renew the certificate?