• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Issue Let's encrypt and Docker extension

Bruno Quintana

New Pleskian
I have noticed that none of the docker's containers that I am using from Plesk are able to renew/install the certificate, and this is basically because the url /.well-known/acme-challenge... is 404

I did some research, and I have found that one workaround could be to configure Nginx to serve that file instead of doing the reverse proxy.

The problem with that, is that the file to configure this is automatically generated by Plesk, and if I try to do it from the fronend I get an error that the configuration is duplicated.

The actually autogenerated file has this:

...
#extension letsencrypt begin
location /.well-known/acme-challenge/ {
root /var/www/vhosts/default/htdocs;

types { }
default_type text/plain;

satisfy any;
auth_basic off;
allow all;

location ~ ^/\.well-known/acme-challenge.*/\. {
deny all;
}
}
#extension letsencrypt end
...
And I would like to do allow all:


#extension letsencrypt begin
location /.well-known/acme-challenge/ {
root /var/www/vhosts/default/htdocs;

types { }
default_type text/plain;

satisfy any;
auth_basic off;
allow all;

location ~ ^/\.well-known/acme-challenge.*/\. {
allow all;
}
}
#extension letsencrypt end


But when I add this to
"Additional nginx directives"

I get this error:

Invalid nginx configuration: nginx: [emerg] duplicate location "/.well-known/acme-challenge/" in /var/www/vhosts/system/xx/conf/vhost_nginx.conf:2 nginx: configuration file /etc/nginx/nginx.conf test failed

Any ideas?
 
Back
Top