# Discouse passes localhost uri as oauth redirect\_uri

**URL:** https://meta.discourse.org/t/discouse-passes-localhost-uri-as-oauth-redirect-uri/32905
**Category:** Support
**Created:** [04.Сентябрь.2015 12:06:53 UTC](https://meta.discourse.org/t/discouse-passes-localhost-uri-as-oauth-redirect-uri/32905 "2015-09-04T12:06:53Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [04.Сентябрь.2015 22:41:47 UTC](https://meta.discourse.org/t/discouse-passes-localhost-uri-as-oauth-redirect-uri/32905/3 "2015-09-04T22:41:47Z")

</div>

> [@marijn](#):
>
> Edit: Forgot to mention, the container isn’t directly binding port 80/443, but being proxied through an nginx, since the host serves other sites as well.

Did you forget this part of the nginx config?

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/1):
>
> proxy\_pass [http://unix](http://unix):/var/discourse/shared/standalone/nginx.http.sock:;  
> proxy\_set\_header Host $http\_host;  
> proxy\_http\_version 1.1;  
> proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;  
> proxy\_set\_header X-Forwarded-Proto $proto;  
> }

---

_[View the full topic](https://meta.discourse.org/t/discouse-passes-localhost-uri-as-oauth-redirect-uri/32905)._
