設定從外網連線到PVE主機

           BUBU 有時在外面可以方便快速連線回來查看是什麼問題,那 BUBU 是使用 NGINX WEB服務器使用代理方式來連線。


	proxy_pass https://XXX.XXX.XXX.XXX:8006;
# Disable buffering to serve data immediately to clients.
# Increase timeouts from default 60 seconds to 5 minutes for the console not to close when no data is transferred.
# Additionally the max_body_size was increased to 5 GB to allow uploads of huge ISOs via the Web UI.
   proxy_buffering off;
   proxy_buffer_size 4k;
   client_max_body_size 5g;
   proxy_connect_timeout 300s;
   proxy_read_timeout 300s;
   proxy_send_timeout 300s;
   send_timeout 300s;

 # Enable proxy websockets for the noVNC console to work
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";


  # Standard proxying headers
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Host $server_name;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      
  # SSL proxying headers
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Ssl on;

	proxy_pass_header Authorization;

 

參考相關網頁: