nginx on separate host as reverse proxy with domain name

Mar 6, 2024
20
1
3
Hello,

I am trying to configure my nginx instance in such a way that it will reverse proxy proxmox.internal to 10.0.1.1:8006.

All of the guides I find, including the official documentation explain how to do this but they do not include configuration for a domain name, and my nginx instance is located on a different host.

Could someone help me get this to work? I would appreciate it!

Config:
Code:
server {
    listen 80;
    server_name proxmox.internal www.proxmox.internal;
    rewrite ^(.*) https://$host$1 permanent;
}

upstream proxmox {
    server 10.0.1.1:8006;
}

server {
    listen 443 ssl;
    server_name proxmox.internal www.proxmox.internal;
    ssl_certificate /cert/pve-ssl.pem;
    ssl_certificate_key /cert/pve-ssl.key;
    proxy_redirect off;

    location / {
        proxy_ssl_protocols TLSv1.2;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_buffering off;
        client_max_body_size 0;
        proxy_connect_timeout 3600s;
        proxy_read_timeout 3600s;
        proxy_send_timeout 3600s;
        send_timeout 3600s;

        proxy_pass https://proxmox;
    }
}

When I navigate to https://proxmox.internal I get into an infinite loading loop.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!