Installing Discourse Forum on Virtualmin

Just wanted to add that if you install discourse as per the instructions here, if you enable https from inside discourse you will be unable to login. It will just give you “unknown error” and Error 403. Also “bad csrf”

in apache add these lines to fix:

RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
RequestHeader set X-Real-IP expr=%{REMOTE_ADDR}

you can force ssl externally but then the email templates will all mention http instead of https

1 Like