PVE subdirectory reverse proxy with NGINX

justlookingaround11

New Member
May 18, 2019
5
0
1
35
Hey all, after some searching i saw that a year or 2 ago it was not possible to have the proxmox webgui reverse proxy with a subdirectory on NGINX, only option was a subdomain.
I was just wondering is that still the case? I don't seem to be able to get it to work with a subdirectory, I even followed this config which at least got me a blank white page loaded with the correct "webpage title".
https://ixorthings.blogspot.com/2015/10/proxmox-v4-nginx-reverse-proxy-with-vnc.html
 
Here's my sample of NGINX conf. Maybe it can help you:
Code:
server {
    listen                         443;
    server_name                 <proxmox_domain>
    root                        "/var/www/html/htdocs/";  #or another folder
    
    ssl_certificate             <proxmox_fullchain>;
    ssl_certificate_key         <proxmox_private>;
    proxy_redirect                 off;

    location / {
        proxy_http_version         1.1;
        proxy_set_header         Upgrade $http_upgrade;
        proxy_set_header         Connection "upgrade";
        proxy_pass                 https://<proxmox_ip>:8006;
        proxy_set_header         Host $http_host;
        proxy_set_header         X-Real-IP $remote_addr;
        proxy_set_header         X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header         X-Forward-Proto http;
        proxy_set_header         X-Nginx-Proxy true;
        proxy_buffering         off;
        client_max_body_size     0;
        proxy_connect_timeout    3600s;
        proxy_read_timeout        3600s;
        proxy_send_timeout        3600s;
        send_timeout            3600s;
    }
    
    location /.well-known {
        try_files                 $uri $uri/;
    }
}