# How do I configure Discourse behind an AWS or Google Cloud Proxy with SSL

**URL:** https://meta.discourse.org/t/how-do-i-configure-discourse-behind-an-aws-or-google-cloud-proxy-with-ssl/78943
**Category:** Self-hosting
**Created:** [24.Январь.2018 11:11:31 UTC](https://meta.discourse.org/t/how-do-i-configure-discourse-behind-an-aws-or-google-cloud-proxy-with-ssl/78943 "2018-01-24T11:11:31Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Anil\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@Anil\_Gupta](https://meta.discourse.org/u/Anil_Gupta)
#### Post date: [24.Январь.2018 16:07:06 UTC](https://meta.discourse.org/t/how-do-i-configure-discourse-behind-an-aws-or-google-cloud-proxy-with-ssl/78943/4 "2018-01-24T16:07:06Z")

</div>

Check this out:

> [@X-Forwarded-For proxy tag not recognized by Discourse?](https://meta.discourse.org/t/x-forwarded-for-proxy-tag-not-recognized-by-discourse/77961/5):
>
> Thanks Kane for your help, but the primary problem is something else. After further analysis, I think what we need is this redirection rule on Discourse Nginx config: server { listen 80; server\_name www.example.org; if ($http\_x\_forwarded\_proto != "https") { rewrite ^(.\*)$ https://$server\_name$REQUEST\_URI permanent; } } This is because if the User is on HTTPS url and tries to log in with Google OAuth, it works fine. So, our primary problem is only r…

The problem is that you need to use **X-forwarded-http** header if your discourse server is behind a load balancer.

Unfortunately, Discourse does not have a solution for this out of the box.  
I am myself searching for a solution and have not found any, yet.

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-configure-discourse-behind-an-aws-or-google-cloud-proxy-with-ssl/78943)._
