After many many fails now a working one. This is for https://domain.tld/proxmox:
location ~ ^/(?:proxmox|pve2|api2|novnc)$ {
rewrite /(proxmox|pve2|api2|novnc) /$1/ permanent;
}
location ~ ^/(?:proxmox|pve2|api2|novnc)/ {
rewrite /proxmox/(.*) /$1 break;
rewrite /((?:pve2|api2|novnc)/.*) /$1 break;
proxy_pass https://xxx.xxx.xxx.xxx:8006;
proxy_read_timeout 90;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_set_header Origin http://$host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
thanx
ReplyDelete