# Troubleshooting "BAD CSRF" error on initial site setup?

**URL:** https://meta.discourse.org/t/troubleshooting-bad-csrf-error-on-initial-site-setup/97059
**Category:** Self-hosting
**Created:** [9월 12, 2018, 5:23오후 UTC](https://meta.discourse.org/t/troubleshooting-bad-csrf-error-on-initial-site-setup/97059 "2018-09-12T17:23:19Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Lee\_Ars](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lee_ars/32/1597_2.png) [@Lee\_Ars](https://meta.discourse.org/u/Lee_Ars)
#### Post date: [9월 12, 2018, 5:41오후 UTC](https://meta.discourse.org/t/troubleshooting-bad-csrf-error-on-initial-site-setup/97059/3 "2018-09-12T17:41:19Z")

</div>

> [@pfaffman](#):
>
> It’s likely a problem with whatever is doing https. How’s that configured?

The web server hosts 4 domains and seven separate web sites, so universal SSL termination is done by HAProxy so I can keep the layers separated and provide caching even to SSL content.

The stack is HAProxy → Varnish (cache) → nginx reverse proxy → Discourse.

Worth noting that I had no issues setting up the first Discourse forum under this same configuration.

Edited to add - client connections are over https, but I’m proxying from nginx to the docker container’s HTTP port, not HTTPS (again, doing what works for the first Discourse instance). I can try changing that to the HTTPS port to see what happens, though, if that’ll help.

edit^2 - no, that didn’t help.

---

_[View the full topic](https://meta.discourse.org/t/troubleshooting-bad-csrf-error-on-initial-site-setup/97059)._
