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
| proxy_cache_path /var/cache/nginx keys_zone=cache_zone:10m min_free=100M; | |
| server { | |
| #... | |
| location / { | |
| proxy_pass http://backend; | |
| proxy_cache cache_zone; | |
| proxy_cache_key $uri; | |
| } | |
| } |
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
| #!/usr/bin/env bash | |
| if [ "$EUID" -ne 0 ];then | |
| >&2 echo "This script requires root level access to run" | |
| exit 1 | |
| fi | |
| if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then | |
| >&2 echo "WORDPRESS_DB_PASSWORD must be set" | |
| >&2 echo "Here is a random one that you can paste:" |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "unit.nginx.org/go" | |
| "os" | |
| "strconv" | |
| ) |
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
| { | |
| "listeners": { | |
| "*:80": { | |
| "pass": "applications/ab_app" | |
| } | |
| }, | |
| "applications": { | |
| "ab_app": { | |
| "type": "php", |
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
| { | |
| "servers": { | |
| "192.168.0.100:8080": { | |
| "weight": 2, | |
| }, | |
| "192.168.0.101:8080": { | |
| "weight": 2, | |
| }, | |
| "192.168.0.102:8080" | |
| } |
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
| js_import logging.js; # Load this JS file as the 'logging' module | |
| js_set $raw_headers_in logging.rawHeadersOnError; | |
| log_format json escape=none '{"response":' | |
| '{"timestamp":"$time_iso8601","status":$status},' | |
| '"request":' | |
| '{"client":"$remote_addr","uri":"$request_uri","headers":$raw_headers_in}}'; | |
| server { | |
| listen 80; |
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
| { | |
| "listeners": { | |
| "*:8080": { | |
| "pass": "routes/wordpress" | |
| } | |
| }, | |
| "routes": { | |
| "wordpress": [ | |
| { | |
| "match": { |
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
| { | |
| "action": { | |
| "share": "/data/www/", | |
| "fallback": { | |
| "pass": "applications/php_blog" | |
| } | |
| } | |
| } |
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
| keyval_zone zone=grpc-greeter:128K type=ip timeout=48h; | |
| keyval $remote_addr $greeter_upstream zone=grpc-greeter; | |
| server { | |
| listen 50052 ssl http2; | |
| ssl_certificate /etc/ssl/certificate.crt; | |
| ssl_certificate_key /etc/ssl/privateKey.key; | |
| location /helloworld.Greeter { | |
| grpc_pass grpc://$greeter_upstream; #TLS termination |