# \#nginx

**URL:** https://meta.discourse.org/tag/nginx/489.md

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

---

## [Backup download cannot resume after interruption because email token has already been consumed](https://meta.discourse.org/t/backup-download-cannot-resume-after-interruption-because-email-token-has-already-been-consumed/411277)

<div class="topic-metadata">

**Author:** [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**Replies:** 3\
**Last updated:** [September 15, 2026, 2:47pm UTC](https://meta.discourse.org/t/backup-download-cannot-resume-after-interruption-because-email-token-has-already-been-consumed/411277 "2026-09-15T14:47:03Z")

</div>

There was a previous backup-download issue which appears to have been fixed in 2026.01.0-latest. I believe this is a separate current issue involving recovery from an interrupted backup download, rather than the old init…

---

## [Nginx crash-loops after container restart: base image ships brotli\_static in discourse.conf but never loads the module (unknown directive)](https://meta.discourse.org/t/nginx-crash-loops-after-container-restart-base-image-ships-brotli-static-in-discourse-conf-but-never-loads-the-module-unknown-directive/410530)

<div class="topic-metadata">

**Author:** [@oxFilla](https://meta.discourse.org/u/oxFilla)\
**Replies:** 1\
**Last updated:** [September 7, 2026, 7:47pm UTC](https://meta.discourse.org/t/nginx-crash-loops-after-container-restart-base-image-ships-brotli-static-in-discourse-conf-but-never-loads-the-module-unknown-directive/410530 "2026-09-07T19:47:52Z")

</div>

Summary After a routine container restart (host reboot / docker restart), nginx fails to start inside the app container with: nginx: \[emerg\] unknown directive "brotli\_static" in /etc/nginx/conf.d/discourse.conf:172 T…

---

## [Caddy in front of app’s Nginx via Docker Compose](https://meta.discourse.org/t/caddy-in-front-of-app-s-nginx-via-docker-compose/410123)

<div class="topic-metadata">

**Author:** [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**Replies:** 5\
**Last updated:** [August 17, 2026, 7:20am UTC](https://meta.discourse.org/t/caddy-in-front-of-app-s-nginx-via-docker-compose/410123 "2026-08-17T07:20:40Z")

</div>

I’ve upgraded one of my Discourse forum servers, so to open UDP 443 rather than only TCP in the IONOS Cloud Panel firewall (i’m from GB). I don’t use CDN because this particular forum isn’t big user number, but has lots…

---

## [How can I modify the Nginx configuration directly within discourse/docker?](https://meta.discourse.org/t/how-can-i-modify-the-nginx-configuration-directly-within-discourse-docker/406863)

<div class="topic-metadata">

**Author:** [@Boubou](https://meta.discourse.org/u/Boubou)\
**Replies:** 2\
**Last updated:** [July 5, 2026, 4:53pm UTC](https://meta.discourse.org/t/how-can-i-modify-the-nginx-configuration-directly-within-discourse-docker/406863 "2026-07-05T16:53:27Z")

</div>

I would like to modify the Nginx/Docker configuration because my Discourse installation is behind HAProxy. The issue I am facing is as follows: All IPs connecting to my Discourse installation appear as the HAProxy IP ad…

---

## [Receiving error regarding certificate not being able to load](https://meta.discourse.org/t/receiving-error-regarding-certificate-not-being-able-to-load/406822)

<div class="topic-metadata">

**Author:** [@LaugeSvan](https://meta.discourse.org/u/LaugeSvan)\
**Replies:** 2\
**Last updated:** [July 4, 2026, 2:06pm UTC](https://meta.discourse.org/t/receiving-error-regarding-certificate-not-being-able-to-load/406822 "2026-07-04T14:06:41Z")

</div>

I’m for the first time trying to install discourse for a local community, and it just refuses to work. It’s probably dumb, but i can’t get the error to go away. This is what it’s saying: nginx: \[emerg\] cannot load cert…

---

## [How to get user IP after updating commit b4a3389](https://meta.discourse.org/t/commit-b4a3389-ip/406267)

<div class="topic-metadata">

**Author:** [@CLOUD\_PHT](https://meta.discourse.org/u/CLOUD_PHT)\
**Replies:** 3\
**Last updated:** [June 29, 2026, 5:13pm UTC](https://meta.discourse.org/t/commit-b4a3389-ip/406267 "2026-06-29T17:13:06Z")

</div>

After updating All users' last used addresses have changed to the Docker gateway, such as 172.17.0.1 My architecture is as follows: Cloudflare → VPS Nginx → Discourse Docker Nginx → Discourse

---

## [Config help when reverse proxy and discourse on seperate computers](https://meta.discourse.org/t/config-help-when-reverse-proxy-and-discourse-on-seperate-computers/403720)

<div class="topic-metadata">

**Author:** [@selfaware](https://meta.discourse.org/u/selfaware)\
**Replies:** 0\
**Last updated:** [May 24, 2026, 3:15pm UTC](https://meta.discourse.org/t/config-help-when-reverse-proxy-and-discourse-on-seperate-computers/403720 "2026-05-24T15:15:00Z")

</div>

Hi, System: Unbuntu 24.04 Nginix I have a fully functional discourse server running @ forum.example.com on e.g, 192.168.0.2 and a reverse proxy hosting a static home page @ example.com on e.g., 192.168.0.1. Since th…

---

## [Reverse proxy X-Forwarded-For](https://meta.discourse.org/t/reverse-proxy-x-forwarded-for/403181)

<div class="topic-metadata">

**Author:** [@Eviepayne](https://meta.discourse.org/u/Eviepayne)\
**Replies:** 5\
**Last updated:** [May 17, 2026, 3:28pm UTC](https://meta.discourse.org/t/reverse-proxy-x-forwarded-for/403181 "2026-05-17T15:28:55Z")

</div>

I recently migrated my forum to a much more performant host, and I am working towards high availability. in the reverse proxy I added the Forward Proto and For headers but the nginx configuration on the discourse only r…

---

## [User-specific 502 errors after login — traced to DiscourseUpdates.has\_unseen\_features?](https://meta.discourse.org/t/user-specific-502-errors-after-login-traced-to-discourseupdates-has-unseen-features/394612)

<div class="topic-metadata">

**Author:** [@serkhelesheyi](https://meta.discourse.org/u/serkhelesheyi)\
**Replies:** 3\
**Last updated:** [April 16, 2026, 8:37am UTC](https://meta.discourse.org/t/user-specific-502-errors-after-login-traced-to-discourseupdates-has-unseen-features/394612 "2026-04-16T08:37:33Z")

</div>

Hello, I’m facing a strange issue with my Discourse where 502 errors happen only for one specific user (admin) account after login, while: Anonymous users can access the site normally Other user accounts can log i…

---

## [External nginx proxy and https false error](https://meta.discourse.org/t/external-nginx-proxy-and-https-false-error/397128)

<div class="topic-metadata">

**Author:** [@Dataaja95](https://meta.discourse.org/u/Dataaja95)\
**Replies:** 3\
**Last updated:** [February 27, 2026, 7:13am UTC](https://meta.discourse.org/t/external-nginx-proxy-and-https-false-error/397128 "2026-02-27T07:13:18Z")

</div>

hi I am using an external nginx proxy in front of the discourse basic docker installation, everything else worked great except that mobile app users cannot log in and the api keys are not displayed in the admin control …

---

## [Users Can’t Log In After Nginx Setup](https://meta.discourse.org/t/users-can-t-log-in-after-nginx-setup/394088)

<div class="topic-metadata">

**Author:** [@1vernit3](https://meta.discourse.org/u/1vernit3)\
**Replies:** 1\
**Last updated:** [January 23, 2026, 6:34pm UTC](https://meta.discourse.org/t/users-can-t-log-in-after-nginx-setup/394088 "2026-01-23T18:34:53Z")

</div>

After switching to Nginx, users can no longer sign in or sign up.Both admins and regular users are unable to log in, and attempting to create a new account gives the message: “We can’t detect if your account has been cre…

---

## [Although the entire site has CDN enabled, Nginx still leaks the origin IP after enabling SSL, how to solve it?](https://meta.discourse.org/t/cdn-ssl-nginx-ip/376043)

<div class="topic-metadata">

**Author:** [@Denny\_Lu](https://meta.discourse.org/u/Denny_Lu)\
**Replies:** 1\
**Last updated:** [July 28, 2025, 2:52am UTC](https://meta.discourse.org/t/cdn-ssl-nginx-ip/376043 "2025-07-28T02:52:24Z")

</div>

Although the entire site has enabled CDN, NGINX still leaked the origin server IP after enabling SSL. How to solve it?

---

## [Customising Discourse's web server behaviour using outlets](https://meta.discourse.org/t/customising-discourses-web-server-behaviour-using-outlets/356361)

<div class="topic-metadata">

**Author:** [@supermathie](https://meta.discourse.org/u/supermathie)\
**Replies:** 3\
**Last updated:** [March 12, 2025, 2:14am UTC](https://meta.discourse.org/t/customising-discourses-web-server-behaviour-using-outlets/356361 "2025-03-12T02:14:11Z")

</div>

Summary As of this commit the default nginx configuration for Discourse includes what are known as “outlets” - a supported way to inject additional statements into the nginx configuration in appropriate places. This cha…

---

## [Nginx as reverse proxy and Content Security Policy issue](https://meta.discourse.org/t/nginx-as-reverse-proxy-and-content-security-policy-issue/322288)

<div class="topic-metadata">

**Author:** [@sandra.mccollum](https://meta.discourse.org/u/sandra.mccollum)\
**Replies:** 7\
**Last updated:** [August 19, 2024, 11:49pm UTC](https://meta.discourse.org/t/nginx-as-reverse-proxy-and-content-security-policy-issue/322288 "2024-08-19T23:49:49Z")

</div>

Anyone using nginx as a reverse proxy figured out the correct syntax to configure style-src? I would love to see a working CSP add header for CSP Credit goes to moderator for the pic.

---

## [Discourse with Cloudflare and Digital Ocean](https://meta.discourse.org/t/discourse-with-cloudflare-and-digital-ocean/320099)

<div class="topic-metadata">

**Author:** [@lilacbull](https://meta.discourse.org/u/lilacbull)\
**Replies:** 2\
**Last updated:** [August 5, 2024, 11:40pm UTC](https://meta.discourse.org/t/discourse-with-cloudflare-and-digital-ocean/320099 "2024-08-05T23:40:05Z")

</div>

Hello! I’m a newcomer here trying to perhaps start a community with Discourse. I started my journey with the following How-To on installing Discourse with Digital Ocean: I already had accounts with Cloudflare so it w…

---

## [Any way to play with nginx conf values without rebuilding?](https://meta.discourse.org/t/any-way-to-play-with-nginx-conf-values-without-rebuilding/311360)

<div class="topic-metadata">

**Author:** [@helmi](https://meta.discourse.org/u/helmi)\
**Replies:** 13\
**Last updated:** [June 24, 2024, 2:48pm UTC](https://meta.discourse.org/t/any-way-to-play-with-nginx-conf-values-without-rebuilding/311360 "2024-06-24T14:48:55Z")

</div>

I’m already using higher values for worker\_connections and worker\_processes on nginx through replace rules in app.yml Though I would play around to find the best values a bit ideally without rebuilding discourse every t…

---

## [Separating out the nginx web server](https://meta.discourse.org/t/separating-out-the-nginx-web-server/313068)

<div class="topic-metadata">

**Author:** [@Isambard](https://meta.discourse.org/u/Isambard)\
**Replies:** 1\
**Last updated:** [June 21, 2024, 4:57pm UTC](https://meta.discourse.org/t/separating-out-the-nginx-web-server/313068 "2024-06-21T16:57:55Z")

</div>

I’ve seen a few examples here of putting Nginx in front of Discourse as a reverse proxy. This might be a good approach as you leave all of the Discourse part alone. However, you do end up with back to back Nginx instanc…

---

## [Keyboard and mouse stopped working + content-security-policy error](https://meta.discourse.org/t/keyboard-and-mouse-stopped-working-content-security-policy-error/284544)

<div class="topic-metadata">

**Author:** [@ygramoel](https://meta.discourse.org/u/ygramoel)\
**Replies:** 6\
**Last updated:** [November 6, 2023, 3:06pm UTC](https://meta.discourse.org/t/keyboard-and-mouse-stopped-working-content-security-policy-error/284544 "2023-11-06T15:06:34Z")

</div>

I’m running a self-hosted instance of Discourse at forum.embeetle.com. It has been running well for multiple years now. This morning, I noticed that all keyboard and mouse interaction with the forum in the browser stopp…

---

## [Nginx.http.sock not created](https://meta.discourse.org/t/nginx-http-sock-not-created/271441)

<div class="topic-metadata">

**Author:** [@MaitreCake](https://meta.discourse.org/u/MaitreCake)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 2:00pm UTC](https://meta.discourse.org/t/nginx-http-sock-not-created/271441 "2023-07-13T14:00:35Z")

</div>

Hello, I decided to leave phpbb few weeks ago to discourse. I installed it on a Raspberry pi under ubuntu 22.04. After numerous attempts to make it work behind Apache I decided to go with Nginx. (I need to run several…

---

## [How can I update the nginx config directly in discourse/docker ..?](https://meta.discourse.org/t/how-can-i-update-the-nginx-config-directly-in-discourse-docker/264011)

<div class="topic-metadata">

**Author:** [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)\
**Replies:** 9\
**Last updated:** [May 6, 2023, 5:42pm UTC](https://meta.discourse.org/t/how-can-i-update-the-nginx-config-directly-in-discourse-docker/264011 "2023-05-06T17:42:22Z")

</div>

inside the web template file, I found the instructions where it update the nginx config file template (replace statements) .. Isn’t there away to add a whole new section to nginx config ??? /uploads folder in discourse…

---

## [Insert text into nginx.conf to partially anonymize IP logs](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308)

<div class="topic-metadata">

**Author:** [@DMTryptamines](https://meta.discourse.org/u/DMTryptamines)\
**Replies:** 1\
**Last updated:** [March 24, 2023, 5:19pm UTC](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308 "2023-03-24T17:19:42Z")

</div>

Essentially I want to modify nginx.conf to insert text at the end of the file from the below link: I understand I need to do this with a hook in app.yml but I’m having a hard time understanding exactly how this works.…

---

## [Gzip compression on by default?](https://meta.discourse.org/t/gzip-compression-on-by-default/255069)

<div class="topic-metadata">

**Author:** [@AquaL1te](https://meta.discourse.org/u/AquaL1te)\
**Replies:** 0\
**Last updated:** [February 14, 2023, 7:32am UTC](https://meta.discourse.org/t/gzip-compression-on-by-default/255069 "2023-02-14T07:32:33Z")

</div>

Continuing the discussion from Discourse not using brotli or gzip compression?: In the discussion above it’s mentioned to set some nginx proxy lines to disable compression. My forum uses content-encoding gzip. Since thi…

---

## [HSTS header not set with www and non www setup](https://meta.discourse.org/t/hsts-header-not-set-with-www-and-non-www-setup/241104)

<div class="topic-metadata">

**Author:** [@OrkoGrayskull](https://meta.discourse.org/u/OrkoGrayskull)\
**Replies:** 2\
**Last updated:** [October 6, 2022, 8:48pm UTC](https://meta.discourse.org/t/hsts-header-not-set-with-www-and-non-www-setup/241104 "2022-10-06T20:48:43Z")

</div>

Hello there, I’m using the standard installation. This is what I modified in app.yml: hooks: ## Add Let's Encrypt cert for non-www and www domain name after\_ssl: - replace: filename: …
