|
| 1 | +upstream service { server service:8080; } |
| 2 | +# upstream grpc { server service:8090; } |
| 3 | +# upstream profiling { server service:8091; } |
| 4 | +# upstream telemetry { server service:8092; } |
| 5 | +# upstream vault { server vault:8200; } |
| 6 | + |
| 7 | +server { |
| 8 | + listen 80; |
| 9 | + listen [::]:80; |
| 10 | + |
| 11 | + #:https listen 443 ssl http2; |
| 12 | + #:https listen [::]:443 ssl http2; |
| 13 | + #:https ssl_certificate ${SSL_CERT}; |
| 14 | + #:https ssl_certificate_key ${SSL_KEY}; |
| 15 | + #:https #:le ssl_trusted_certificate ${SSL_CHAIN}; |
| 16 | + #:https ssl_dhparam /etc/nginx/ssl/dhparams.pem; |
| 17 | + #:https ssl_ecdh_curve prime256v1:secp384r1:secp521r1; |
| 18 | + #:https include h5bp/directive-only/ssl.conf; |
| 19 | + #:https #:le include h5bp/directive-only/ssl-stapling.conf; |
| 20 | + #:https if ($scheme = http) { |
| 21 | + #:https return 301 https://$server_name$request_uri; |
| 22 | + #:https } |
| 23 | + #:https add_header Strict-Transport-Security "max-age=86400" always; |
| 24 | + |
| 25 | + server_name tablo.octolab.org tablo.127.0.0.1.xip.io; |
| 26 | + |
| 27 | + charset utf-8; |
| 28 | + index index.html; |
| 29 | + root /usr/share/nginx/html; |
| 30 | + |
| 31 | + etag on; |
| 32 | + |
| 33 | + location = /favicon.ico { log_not_found off; access_log off; } |
| 34 | + location /.well-known/ { root /usr/share/nginx/html; } |
| 35 | + |
| 36 | + location /api/ { |
| 37 | + rewrite ^/api/(.*) /$1 break; |
| 38 | + |
| 39 | + proxy_redirect off; |
| 40 | + proxy_buffering off; |
| 41 | + proxy_pass http://service; |
| 42 | + proxy_set_header Host $http_host; |
| 43 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 44 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 45 | + proxy_set_header X-Real-IP $remote_addr; |
| 46 | + } |
| 47 | + |
| 48 | +# location /grpc/ { |
| 49 | +# rewrite ^/grpc/(.*) /$1 break; |
| 50 | +# |
| 51 | +# grpc_pass grpc://grpc; |
| 52 | +# } |
| 53 | + |
| 54 | +# location /vault/ { |
| 55 | +# rewrite ^/vault/(.*) /$1 break; |
| 56 | +# |
| 57 | +# proxy_redirect off; |
| 58 | +# proxy_buffering off; |
| 59 | +# proxy_pass http://vault; |
| 60 | +# proxy_set_header Host $http_host; |
| 61 | +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 62 | +# proxy_set_header X-Forwarded-Proto $scheme; |
| 63 | +# proxy_set_header X-Real-IP $remote_addr; |
| 64 | +# } |
| 65 | + |
| 66 | + include h5bp/directive-only/x-ua-compatible.conf; |
| 67 | + include h5bp/directive-only/extra-security.conf; |
| 68 | + include h5bp/directive-only/no-transform.conf; |
| 69 | +} |
0 commit comments