Mapped domain dont work?

Hello guys, I have a small network of sites (wordpress multisite with subdomains) in a subdomain, that is,, in which the URL of the sites would be, the mapping to work, I have to do a “gambiarra”, and I can not install SSL.

First, that for me to be able to map and the domain I had to create a normal site via ee site create and edit its file in / etc / nginx / sites-available, pointing it to (enough work just to map a domain, do not you find that strange?

So far so good, but I can not make SSL work, because the site goes into infinite loop after installing SSL via ee site update … --letsencrypt

Would anyone know how to help me, the correct way to map the domain and install an ssl on it?