Come faccio a replicare in nginx ciò che ho fatto in htaccess?

See the link I gave you … Running other websites on the same machine as Discourse

I’m sure you can derive solution from it…