Site redirects to upstream url after login

(ShawnX) #1

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?

(ShawnX) #2

Was because I added the following lines into nginx.conf per Invalid redirect URI in Google OAuth2 API call (http instead of https)

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;