|
|
|
@ -15,6 +15,9 @@ events {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stream {
|
|
|
|
|
upstream backend {
|
|
|
|
|
server tty-proxy:3456;
|
|
|
|
|
}
|
|
|
|
|
log_format json_combined escape=json
|
|
|
|
|
'{'
|
|
|
|
|
'"time_local":"$time_local",'
|
|
|
|
@ -29,9 +32,10 @@ stream {
|
|
|
|
|
# https://nginx.org/en/docs/stream/ngx_stream_core_module.html#server
|
|
|
|
|
# the tty-server tcp connection ssl proxy
|
|
|
|
|
server {
|
|
|
|
|
listen 5432 ssl; #so_keepalive=30m::10;
|
|
|
|
|
proxy_pass localhost:6969;
|
|
|
|
|
|
|
|
|
|
listen 3456 ssl; # so_keepalive=30m::10;
|
|
|
|
|
# listen 3456 ssl so_keepalive=30m::10;
|
|
|
|
|
proxy_pass backend;
|
|
|
|
|
|
|
|
|
|
# proxy_ssl off means terminate ssl here which is good.
|
|
|
|
|
proxy_ssl off;
|
|
|
|
|
ssl_certificate {{ssl.chain}};
|
|
|
|
@ -76,12 +80,12 @@ http {
|
|
|
|
|
access_log /var/log/nginx/data-access.log json_combined;
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
proxy_pass http://localhost:8080;
|
|
|
|
|
proxy_pass http://tty-proxy:8080;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_redirect http://localhost:8080 $scheme://$http_host/;
|
|
|
|
|
proxy_redirect http://tty-proxy $scheme://$http_host/;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
|