That's not actually what's wrong, your config.json was correct. The problem is your nginx config is wrong. Follow the docs here.

Ubuntu (Recommended) - NodeBB Documentation