# Moved site behind proxy, favicon and header not using https anymore

**URL:** https://meta.discourse.org/t/moved-site-behind-proxy-favicon-and-header-not-using-https-anymore/131486
**Category:** Support
**Created:** [October 20, 2019, 3:26pm UTC](https://meta.discourse.org/t/moved-site-behind-proxy-favicon-and-header-not-using-https-anymore/131486 "2019-10-20T15:26:29Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![rossierd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rossierd/32/164604_2.png) [@rossierd](https://meta.discourse.org/u/rossierd)
#### Post date: [May 26, 2020, 1:08pm UTC](https://meta.discourse.org/t/moved-site-behind-proxy-favicon-and-header-not-using-https-anymore/131486/12 "2020-05-26T13:08:23Z")

</div>

Well, after so many unsuccessful attempts, I finally figured out how to have a valid login with force\_https=true.

In the docker env., I patched /etc/nginx/conf.d/discourse.conf as follows:

> …  
> location @discourse {  
> limit\_conn connperip 20;  
> limit\_req zone=flood burst=12 nodelay;  
> limit\_req zone=bot burst=100 nodelay;  
> proxy\_set\_header Host $http\_host;  
> proxy\_set\_header X-Request-Start “t=${msec}”;  
> 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 https; # $thescheme; ← What I modified  
> proxy\_pass [http://discourse](http://discourse);  
> }  
> …

And it **only** works in this section, at least with my environment.

Works great now!

---

_[View the full topic](https://meta.discourse.org/t/moved-site-behind-proxy-favicon-and-header-not-using-https-anymore/131486)._
