bcremer / shopware-with-nginx

Running shopware using NGINX
http://shopware.com
BSD 2-Clause "Simplified" License
95 stars 46 forks source link

Conf is blocking Let's encrypt challenge #42

Open travisbotello opened 6 years ago

travisbotello commented 6 years ago

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

emilv commented 5 years ago

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;
}
travisbotello commented 5 years ago

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;
#}