Skip to content

Instantly share code, notes, and snippets.

@ptflp
Created January 15, 2019 02:11
Show Gist options
  • Save ptflp/687181e57cbc8fa14fb0ee9e68f2952f to your computer and use it in GitHub Desktop.
Save ptflp/687181e57cbc8fa14fb0ee9e68f2952f to your computer and use it in GitHub Desktop.
Gotty nginx proxy_pass configuration conf file
location /tty/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
rewrite ^/tty/?$ / break;
rewrite ^/tty/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8383;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
@ptflp
Copy link
Author

ptflp commented Jan 15, 2019

gotty -p 8383 --address 127.0.0.1 -w bash
Serve gotty on local interface

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