Skip to content

ACME Challenge support on all HTTP virtual hosts

To enable ACME Challenge support on all HTTP virtual hosts and avoid errors due to configuration/rewrite on generation or renewing SSL certificates from Let’s Encrypt you must configure a location alias.

For Apache:

Alias /.well-known/acme-challenge/ /var/www/default/.well-known/acme-challenge/
<Directory "/var/www/default/.well-known/acme-challenge/">
    Options None
    AllowOverride None
    ForceType text/plain
    RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
</Directory>

For Nginx:

location "/.well-known/acme-challenge" {
        allow all;
        default_type "text/plain";
        root /var/www/default;
}
Published inLinuxWebservers
© 2019 - Marian Amza. All rights reserved.
Powered by Wordpress & Debian