Nginx redirects to unwanted port?[link—standalone]
I recently experinced on 2 diffrent occasions, Nginx redirecting to some unreachable port when the trailing slash (/) was missing
If this happens to you simply paste the following into your nginx.conf if you want to change it globally, or throw it inside your site specific config, if you want it to apply to 1 site only.
Check out the official documentation