Nginx反向代理Esxi控制台

Sakura 发布于 2024-01-27 330 次阅读


server {
    listen 9001 ssl;
    server_name _;

    ssl_certificate         /data/software/tengine/conf/ssl/esxi/server.crt;
    ssl_certificate_key     /data/software/tengine/conf/ssl/esxi/server.key;

    location / {
        proxy_pass https://Esxi;
        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_ssl_verify off;

        # WebSocket support 此配置可以使用vnc
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}