# Persistent nginx/discourse.conf?

**URL:** <https://meta.discourse.org/t/persistent-nginx-discourse-conf/85363>\
**Category:** Self-hosting\
**Created:** [15. April 2018 um 08:09 UTC](https://meta.discourse.org/t/persistent-nginx-discourse-conf/85363 "2018-04-15T08:09:58Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [26. August 2020 um 20:57 UTC](https://meta.discourse.org/t/persistent-nginx-discourse-conf/85363/6 "2020-08-26T20:57:12Z")

</div>

Danke, @ryanerwin! Das war eine große Hilfe. Wenn du aus irgendeinem Grund darauf angewiesen bist, dass `/srv/status` funktioniert, wird deine Lösung das unterbrechen. So kannst du zulassen, dass `/srv/status` ohne `auth_basic` bereitgestellt wird.

```plaintext
# Basic-Auth
    - replace:
       filename: "/etc/nginx/conf.d/discourse.conf"
       from: "# auth_basic on"
       to: "auth_basic on"
    - replace:
       filename: "/etc/nginx/conf.d/discourse.conf"
       from: "# auth_basic_user_file /etc/nginx/htpasswd"
       to: "auth_basic_user_file /etc/nginx/htpasswd"
    - replace:
       filename: "/etc/nginx/conf.d/discourse.conf"
       from: "location = /srv/status {"
       to: "location = /srv/status {
           auth_basic off;"
    - file:
       path: "/etc/nginx/htpasswd"
       contents: |
        discourse:$apr1$y2JsCAxw$UuDgGdsoXNf.4Rl15Hp2b0

```

Das obige Beispiel ist für den Benutzer „discourse

---

_[View the full topic](https://meta.discourse.org/t/persistent-nginx-discourse-conf/85363)._
