Custom vhost conf and ssl.

WHen I set site’s root folder to a subfolder like “public_html/somefolder”, ssl renewal fail from nginx site. Is there a way to fix this?