감사합니다. 이 단서가 문제를 해결하는 데 도움이 되었습니다. 제 Discourse 서버의 app.yml에서 업데이트된 기본 인증(basic auth) 섹션은 다음과 같습니다 (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는 다음과 같이 보고합니다:
