系统需要配置SSL(重要)

PVE添加API令牌

注意权限控制 仅用于VNC连接
然后设置站点NG配置
api2 为反代路径地址

location /api2/ {
        client_max_body_size 1000m;
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_set_header X-Forwarded-Ssl on;
        proxy_set_header "Authorization" "PVEAPIToken=令牌ID=令牌密钥";

        proxy_connect_timeout  3600s;
        proxy_read_timeout  3600s;
        proxy_send_timeout  3600s;
        send_timeout  3600s;
        proxy_ssl_verify off;
        proxy_pass https://PVE节点地址:8006;
    }

配置完成后 访问反代地址
看是否响应501 为反代配置成功

然后至系统节点设置


配置节点代理地址后配置完成

文档更新时间: 2024-10-24 09:10   作者:carlos