ありがとうございます。この手がかりのおかげで問題を解決できました。以下は、私のDiscourseサーバーのapp.ymlの更新された基本的な認証セクションです(Wordpressサーバーに変更は必要ありませんでした)。
# basic auth
after_bundle_exec:
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "# Allow bypass cache from localhost"
to: |
# Allow bypass basic authentication for WP-Discourse plugin
geo $authentication {
default "Credentials you must provide.";
127.0.0.1 "off";
151.101.3.55/32 "off";
}
# Allow bypass cache from 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は私のWordpressサーバーの(例としての)パブリックIPアドレスです。WP-Discourseは現在次のように報告しています。
