The issue seems to have migrated from installing and using composer, to setting up a custom nginx config, to using the one provided here with extra options, to a unknown DEBUG error in flarum.
@PietroGiuseppeDAmico, you've yet to respond to my initial post. I post that when I don't see enough information provided to really help. What ends up happening is we have to guess.
In this case, the server error logs and precisely what you have attempted are very important.
but if i add it, nginx dont work and said me error
The server error logs (likely /var/log/nginx/error.log) would be especially helpful with nginx configuration related issues
After testing your settings, please post the relevant lines from the error log, after redacting sensitive informaiton.
That only informs there is a issue with flarum, click on the DEBUG and copy that message here.