Webroot plugin : The client lacks sufficient authorization

Thanks so much! This finally solved the permission problem on my nginx/ghost blog.
I didn’t know what to do but I added this line first to my nginx conf before I issued the generate command.

location ~ ^/.well-known {
        root /var/www/ghost;
    }

But still no luck until I added your line. I did not have any rule for hidden files like you. This below worked perfect and the certificate was issued:

location ~ ^/.well-known {
        root /var/www/ghost;
        allow all;
    }