Created
June 28, 2022 00:08
-
-
Save nginx-gists/49adc7dfdf4ee9364cfff3288eb99d49 to your computer and use it in GitHub Desktop.
Announcing NGINX Plus R27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
auth_jwt "closed site"; | |
auth_jst_key_file /path/to/jwks; | |
auth_jwt_require $req1 $req2 error=403; # return 403 on failure | |
} | |
# vim: syntax=nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
upstream backend { | |
zone backend 1m; | |
server 10.0.0.1; | |
server 10.0.0.2; | |
} | |
server { | |
location / { | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_pass https://backend; | |
health_check keepalive_time=60s interval=1s; | |
} | |
} | |
} | |
# vim: syntax=nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
upstream upstream1 { | |
zone uz 64k; | |
server 127.0.0.1:8081; | |
server 127.0.0.1:8082; | |
} | |
server { | |
listen 127.0.0.1:8000; | |
location /api { | |
api write=on; | |
} | |
} | |
server { | |
status_zone srv; | |
listen 127.0.0.1:8080 ssl; | |
ssl_certificate /etc/ssl/www.example.com.crt; | |
ssl_certificate_key /etc/ssl/www.example.com.key; | |
location / { | |
proxy_pass https://upstream1; | |
} | |
} | |
} | |
# vim: syntax=nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a discussion of these files, see Announcing NGINX Plus R27