Document Host header proxy gotcha (#176)

This is a confusing thing for people setting up a new server exposed through another layer of proxy, so documenting it explicitly will hopefully help save people some time.
This commit is contained in:
Andrew Miller 2023-05-12 10:52:57 +10:00 committed by GitHub
parent 14bbf215f6
commit 17218d5eff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,7 @@ server {
location / { location / {
proxy_pass http://localhost:LEMMY_PORT; proxy_pass http://localhost:LEMMY_PORT;
proxy_set_header Host $host;
include proxy_params; include proxy_params;
} }
} }
@ -40,6 +41,8 @@ server {
You should also setup TLS, for example with [Let's Encrypt](https://letsencrypt.org/). [Here's a guide for setting up letsencrypt on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04). You should also setup TLS, for example with [Let's Encrypt](https://letsencrypt.org/). [Here's a guide for setting up letsencrypt on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04).
For federation to work, it is important that you do not change any headers that form part of the signature. This includes the `Host` header - you may need to refer to the documentation for your proxy server to pass through the `Host` header unmodified.
## Updating ## Updating
To update to the newest version, you can manually change the version in `docker-compose.yml`. Alternatively, fetch the latest version from our git repo: To update to the newest version, you can manually change the version in `docker-compose.yml`. Alternatively, fetch the latest version from our git repo: