nginx 反向代理teleport

nginx 反向代理teleport


普通配置(以Nginx服务与TP服务在同一台主机上为例)

# ...其他内容...

  server {
    listen 80;
    server_name www.your-teleport-domain.com;
    location / {
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_pass       http://127.0.0.1:7190;

      # 以下三行是websocket需要的
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
    }
  }

# ...其他内容...

配置为HTTPS

# ...其他内容...

  server {
    listen 443;
    server_name www.your-teleport-domain.com;

    ssl on;
    ssl_certificate_key path/to/your/server-private-key.pem
    ssl_certificate path/to/your/server-cert.pem

    location / {
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_pass       http://127.0.0.1:7190;

      # 以下三行是websocket需要的
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
    }
  }

# ...其他内容...

Teleport默认端口

  • 7190 eleport的WEB后台
  • 52089 RDP远程桌面协议端口
  • 52189 SSH协议端口
  • 52389 Telnet协议端口
posted @ 2023-10-16 16:43  wltianOne  阅读(39)  评论(0编辑  收藏  举报