# Discourse behind reverse proxy and https

**URL:** <https://meta.discourse.org/t/discourse-behind-reverse-proxy-and-https/148705>\
**Category:** Self-hosting\
**Created:** [April 21, 2020, 6:58am UTC](https://meta.discourse.org/t/discourse-behind-reverse-proxy-and-https/148705 "2020-04-21T06:58:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Grunskin](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@Grunskin](https://meta.discourse.org/u/Grunskin)\
**Post date:** [April 21, 2020, 6:58am UTC](https://meta.discourse.org/t/discourse-behind-reverse-proxy-and-https/148705/1 "2020-04-21T06:58:13Z")

</div>

I’m trying to setup Discourse behind my Apache reverse proxy but I can’t get it working properly with https.

I’ve had a lot of problems getting this far. Right now I have Discourse on a server and an Apache server infront of it acting as a reverse proxy. I had a lot of problems getting it to run behind a reverse proxy in the first place since Discourse always wanted to redirect to the hostname set in app.yaml.

Somehow I got it working now though but I get Mixed-content warnings in my browser.  
I have a redirect in Apache from http to https so that is working fine. But Discourse is still serving some stuff over http and I can’t seem to figure out how to force it to change it to https.

For instance the favicon is served over http and I can’t figure out how to change this.

Can I make Discourse change all the links to https without making Discourse handle the https traffic?

I tried to set:

```
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"

```

In Apache but it doesn’t seem to help.

Checking the `force https` flag in Discourse doesn’t help either, it will just break the site since it will just ignore everything over http.  
What should I do to get rid of the mixed content?

---

_[View the full topic](https://meta.discourse.org/t/discourse-behind-reverse-proxy-and-https/148705)._
