Grazie, questo indizio mi ha aiutato a risolvere il problema. Ecco la sezione di autenticazione di base aggiornata di app.yml sul mio server Discourse (non sono state necessarie modifiche sul server Wordpress):
# autenticazione di base
after_bundle_exec:
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "# Allow bypass cache from localhost"
to: |
# Consenti bypass autenticazione di base per il plugin WP-Discourse
geo $authentication {
default "Credenziali che devi fornire.";
127.0.0.1 "off";
151.101.3.55/32 "off";
}
# Consenti bypass cache da 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 è l’indirizzo IP pubblico (di esempio) del mio server Wordpress. WP-Discourse ora segnala:
