Error cannot load certificate "/etc/letsencrypt/live/domainname/fullchain.pem"

nginx can’t know if a token is proper. your application needs to send the proper http 4xx error response.

if nginx can proxy_pass inside a querystring, I don’t know.