iRedMail SSL using Lets Encrypt certbot-auto
<p>I'm setting up a mail server using iRedMail and have everything installed and running. Now trying to change the self signed certificate for a Lets Encrypt using the certbot-auto client. I have added</p>

<pre><code>location ~ /.well-known {
    allow all;
}
</code></pre>

<p>into /etc/nginx/templates/misc.tmpl like this</p>

<pre><code>location ~ /.well-known {
    allow all;
}

# Deny all attempts to access hidden files such as .htaccess.
#location ~ /\. { deny all; }

# Handling noisy messages
location = ^/favicon.ico { access_log off; log_not_found off; }
location = ^/robots.txt { log_not_found off; access_log off; allow all; }
</code></pre>

<p>However when I restart nginx and browse to the URL, I get a 404, and certbot-auto also reports a 404.</p>

<p>I've placed it above the rule to restrict access to hidden files, so this should work.</p>

<p>Any ideas would be massively appreciated. Thanks in advance.</p>