Page 1 of 1

Let's Encrypt and Drupal problem with renewing certificate - Lack of authorization

Posted: Tue Mar 01, 2016 12:13 pm
by vlahonick
Hi guys,

I managed to obtain a Let's Encrypt certificate for my main domain (that holds my drupal multisite) in Vesta but now I have problem with renewing it.

I keep getting that I lack authorization even I disabled my .htaccess before trying to renew the certificate.

Click to enlarge
Image

Re: Let's Encrypt problem with renewing certificate - Lack of authorization

Posted: Fri Mar 04, 2016 9:41 pm
by skamasle
Can you access that url on browser ?

I see that a 403 error, if domain is not online or lets encrypt cant access to it give yout that error.

Check all .htaccess and search fome code blocking user agent or hide files (dot files )

Re: Let's Encrypt problem with renewing certificate - Lack of authorization

Posted: Mon Mar 07, 2016 7:20 am
by vlahonick
The thing was that I just had to reload apache after disabling the .htaccess and run the command below to renew the certificate.

Code: Select all

letsencrypt --webroot -w /home/admin/web/my-domain.com/public_html/ -d my-domain.com -d www.my-domain.com --agree-tos --email [email protected] certonly
So as a feature reference for those who want to renew their certificates in a Vesta + Drupal + Let's Encrypt installation:

Solution 1
1. Disable .htaccess -> mv .htaccess original.htaccess
2. Reload apache -> service apache2 reload
3. Renew the cert -> letsencrypt --webroot -w /home/admin/web/my-domain.com/public_html/ -d my-domain.com -d http://www.my-domain.com --agree-tos --email [email protected] certonly
4. Restore .htaccess -> mv original.htaccess .htaccess
5. Reload apache -> service apache2 reload

Solution 2
As a friend mention another solution would be to modify the .htaccess itself:
Before the line with RewriteRule "(^|/)\." - [F] add the following:

Code: Select all

RewriteCond %{REQUEST_URI} !^/.well-known/
Note that with Solution 2 you might have to modify again the .htaccess after any Drupal updates.

Re: Let's Encrypt and Drupal problem with renewing certificate - Lack of authorization

Posted: Wed Jul 20, 2016 8:19 am
by skurudo
LetsEncrypt support added.
CLI commands for now, GUI will be later.

Code: Select all

v-add-letsencrypt-domain USER DOMAIN [ALIASES] [RESTART]
v-add-letsencrypt-user USER [EMAIL]
v-check-letsencrypt-domain USER DOMAIN
v-list-letsencrypt-user USER [FORMAT]
v-sign-letsencrypt-csr USER DOMAIN CSR_DIR [FORMAT]
v-update-letsencrypt-ssl
ENG: viewtopic.php?t=11927
RUS: viewtopic.php?t=11905