• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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