Onion link is redirected by nginx

Is it recommended to disable the redirect in nginx or simply change the port of the onion and listen on the new port on nginx.

I set up tor daemon, got me link, added the onion template and DISCOURSE_ONION but something is not working