If you’re only setting it up locally temporarily to try it out, I would just spin up a virtual machine rather than trying to get it running alongside nginx.
The virtual machine can be given its own IP, will likely automatically give itself a .local address and you can just do a standard Discourse install inside it.
When done, throw away the virtual machine and you don’t need to worry about reverting any changes to nginx or anything else.