- Setting up NGINX Plus Dashboard, active health checks and view the metrics.
- Configuring key-value store and enable IP allow/deny list.
- Configuring Cache Manager.
- Enabling JWT Authentication.
- NGINX HA mode, Sync configuration and State Sharing Cluster (Option).
- Summary and Q&A.
- ติดตั้ง Ubuntu 18.04 Local VM หรือ Cloud Instance
- ทำการ Copy โฟรเดอร์ Apps (App1, App2, App3, covid-app & jwt-app) ไปไว้ที่ภายใต้ "/opt/services"
- กำหนดไฟล์ hosts บนเครื่อง
<internal-ip> example.com www.example.com example123.com www.example123.com
- ติดตั้ง NGINX Plus (Lasted version).
- NGINX Plus Trial License ได้จาก https://www.nginx.com/free-trial-request
อ้างอิงไฟล์ dashboard.conf
- ในไฟล์ .conf มี servers อยู่ 3 Apps ให้บริการที่พอร์ต
9001, 9002
และ9003.
- Load Balancing ถูกตั้งค่า และเปิดบริการที่พอร์ต
9000
. - API / Dashboard ให้บริการที่พอร์ต
8080
.
อ้างอิงไฟล์ key.value.store.conf
$ curl -s -X GET 'http://<ip-address>:8080/api/6/http/keyvals/allowlist_zone' | jq
$ curl -X POST -d '{"<internal-ip>":"1"}' -s 'http://ip-address:8080/api/6/http/keyvals/allowlist_zone'
$ curl -X PATCH -d '{"<internal-ip>":"0"}' -s 'http://ip-address:8080/api/6/http/keyvals/allowlist_zone'
$ curl -s -X DELETE 'http://<ip-address>:8080/api/6/http/keyvals/allowlist_zone'
- ทำการ blocked access สำหรับ internal IP. ค่า
1
ให้ Deny และ0
ให้ Allow.
อ้างอิงไฟล์ key.value.store.conf
- SSL Termination
- Dynamic SSL Key Management: YouTube
- Dynamic SSL Key Management: GitHub
- $ssl_server_name - Variable
อ้างอิงไฟล์ cache.management.conf
อ้างอิงไฟล์ jwt.validation.conf
- NGINX Demo A/B Testing with JWT Routing
- JWTs for Authentication and Content Based Routing
- Setting up JWT: Tech Doco
- auth_jwt - Directive
อ้างอิงโฟเดอร์ zone-sync-example