Danke, dieser Hinweis hat mir geholfen, das Problem zu lösen. Hier ist der aktualisierte Abschnitt für die Basisauthentifizierung von app.yml auf meinem Discourse-Server (es waren keine Änderungen am WordPress-Server erforderlich):
# Basisauthentifizierung
after_bundle_exec:
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "# Allow bypass cache from localhost"
to: |
# Erlaube die Umgehung der Basisauthentifizierung für das WP-Discourse-Plugin
geo $authentication {
default "Credentials you must provide.";
127.0.0.1 "off";
151.101.3.55/32 "off";
}
# Erlaube die Umgehung des Caches von localhost
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "# auth_basic on"
to: "auth_basic $authentication"
- 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: |
alfred:$apr1$jSdLuHyZ$faWxYGjnmLd/zRC6UMsRs1
151.101.3.55 ist die (Beispiel-)öffentliche IP-Adresse meines WordPress-Servers. WP-Discourse meldet nun:
