Site redirects to upstream url after login

I’m running discourse behind nginx, the upstream url is on port 12345, nginx on 80 with https. I followed How To Install Discourse Behind Nginx on Ubuntu 14.04 | DigitalOcean for the setup

After log in, the site redirects me to, am I missing anything?

Was because I added the following lines into nginx.conf per

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

1 Like