[SOLVED] After setting up reverse proxy with nginx I've lost my node on subdomain panel

tempelis

New Member
Nov 21, 2024
2
0
1
When I access my proxmox panel with a subdomain I've configured, I cant see any of my nodes. If I instead forward port 8006 and access panel directly with my_static_public_ip:forwarded_port, they are intact. What did I do wrong?

here's the nginx config:
NGINX:
server {
    listen 80;  # Use 443 for HTTPS
    server_name maindomain.com;  # Main domain


    # Redirect main domain to subdomain
    return 301 https://proxmox.maindomain.com$request_uri;  # Redirect to the subdomain
}


# SSL Configuration for the Proxmox subdomain
server {
        listen 443 ssl;
        server_name proxmox.maindomain.com;
    ssl_certificate /home/tempelis/certs/fullchain.pem;  # Path to wildcard SSL certificate
    ssl_certificate_key /home/tempelis/certs/privkey.pem;  # Path to wildcard SSL private key
        location / {
        proxy_pass https://192.168.1.46:8006$request_uri;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        }
}
#SSL Configuration for the Main Domain (for redirection)
server {
    listen 443 ssl;
    server_name maindomain.com;  # Main domain


    ssl_certificate /home/tempelis/certs/fullchain.pem;  # Path to wildcard SSL certificate
    ssl_certificate_key /home/tempelis/certs/privkey.pem;  # Path to wildcard SSL private key


    # Redirect main domain to subdomain
#    return 301 https://proxmox.maindomain.com$request_uri;  # Redirect to the subdomain
}

1732173178760.png