Skip to content

Instantly share code, notes, and snippets.

@nginx-gists
Created June 28, 2022 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nginx-gists/49adc7dfdf4ee9364cfff3288eb99d49 to your computer and use it in GitHub Desktop.
Save nginx-gists/49adc7dfdf4ee9364cfff3288eb99d49 to your computer and use it in GitHub Desktop.
Announcing NGINX Plus R27
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
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
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
@nginx-gists
Copy link
Author

For a discussion of these files, see Announcing NGINX Plus R27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment