Allow http access to hidden folders

Hello,

I've been struggling a couple of days with a Magento installation in a server using ISPConfig 3.1.2 on Ubuntu Xenial where the thumbnails would not show up.

It seems the culprit is the following directive (used for let's encrypt i guess?)

    location ~ /\.(?!well-known/acme-challenge/) {
        deny all;
        access_log off;
        log_not_found off;
    }

It seems it's blocking access to all folders preceded by a dot. In my case it is blocking all folders named .tmb in media/ folder which got created by an extension effectively killing all file previews.I'm guessing most apps tend to use such folders so it's not good if a rule is blocking them accidentally.

Removing the above rule in the vhost seems to make them accessible again.

In my search I came accross this page https://www.ioweb.gr/en/blog-en/item/90-magento-nginx-%E2%80%93-thumbs-not-working-in-media-manager

which led me to the culprit however the workaround works for one specific folder. In my case all subfolders get a .tmb directory and I can't really work around it and there might also be more folders that much the same rule.

Any ideas?

Thanks in advance

Kind regards, Gabriel