shopware-with-nginx icon indicating copy to clipboard operation
shopware-with-nginx copied to clipboard

Conf is blocking Let's encrypt challenge

Open travisbotello opened this issue 5 years ago • 2 comments

I am using auto-renewal certificates from Let's encrypt for my shopware installations. The problem with this config is that it somehow blocks the access to the let's encrypt files. Any idea how to bypass this issue?

Thanks in advance

travisbotello avatar Sep 26 '18 11:09 travisbotello

We have this in our server block (https://github.com/bcremer/shopware-with-nginx/blob/95569547f220583097a575490eb71ada39fe1716/sites-available/example.com.conf):

location ^~ '/.well-known/acme-challenge' {
    default_type "text/plain";
    root /var/www/letsencrypt;
}

emilv avatar Nov 08 '18 07:11 emilv

Thanks @emilv. However this didn't work on our server since we already have that implemented in our general server block. We just removed this block:

## Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
#location ~ /\. {
#    deny all;
#    access_log off;
#    log_not_found off;
#}

travisbotello avatar Nov 08 '18 08:11 travisbotello