Hi Everyone,
I have facing a problem of let's encrypt on reverse proxy
Here is my proxy Server Configuration :
server {
server_name *.domain.com;
location '/.well-known/acme-challenge' {
default_type "text/plain";
proxy_pass http://192.168.1.200/letsencrypt-auto;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://192.168.1.200/;
}
}
At the webserver (192.168.1.200)
I create a config for webroot authentication :
/etc/letsencrypt/configs/domain.com.conf
domains = domain.com
rsa-key-size = 4096
server = https://acme-v01.api.letsencrypt.org/directory
email = hello@domain.com
text = True
authenticator = webroot
webroot-path = /var/www/laravel
also I create a symbolic link on my web-root folder
ln -s /var/www/laravel/public/letsencrypt-auto -> /tmp/letsencrypt-auto
I run the command under /opt/letsencrypt (my letsencrypt installed folder) :
sudo ./letsencrypt-auto --config /etc/letsencrypt/configs/domain.com.conf certonly
It returns:
Requesting root privileges to run with virtualenv: /home/user/.local/share/letsencrypt/bin/letsencrypt --config /etc/letsencrypt/configs/domain.com.conf certonly
Failed authorization procedure. domain.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from Website Domain Names, Online Stores & Hosting | Domain.com [111.111.111.111]: 502
IMPORTANT NOTES:
- The following 'urn:acme:error:unauthorized' errors were reported by
the server:
Domains: domain.com
Error: The client lacks sufficient authorization
FAIL: 1
Any help would be much appreciated