شكرًا لك، ساعدني هذا الدليل في حل المشكلة. إليك قسم المصادقة الأساسية المحدث لـ app.yml على خادم Discourse الخاص بي (لم تكن هناك حاجة إلى تغييرات على خادم Wordpress):
# المصادقة الأساسية
after_bundle_exec:
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "# السماح بتجاوز ذاكرة التخزين المؤقت من localhost"
to: |
# السماح بتجاوز المصادقة الأساسية لمكون WP-Discourse الإضافي
geo $authentication {
default "بيانات الاعتماد التي يجب عليك تقديمها.";
127.0.0.1 "off";
151.101.3.55/32 "off";
}
# السماح بتجاوز ذاكرة التخزين المؤقت من 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 هو عنوان IP العام (كمثال) لخادم Wordpress الخاص بي. يبلغ WP-Discourse الآن:
