Problem with Proxmox and external nginx reverse proxy

sprickw

Member
Nov 1, 2020
24
1
8
Waldems, Germany
www.datagon.de
I'm not a pro with networking and whatever I found in this forum just didn't help me to understand what my problem is. I just thaught that I could connect to my Proxmox GUI like I connect to other http(s)-Servers in my network. Proxmox is still 6.4, but I think that doesn't make a difference.

The proxmox.conf using my normal template after collecting a certificate from letsencrypt:

server {
server_name hostname.mydomain.tld;
client_max_body_size 10000M;
location / {
proxy_pass http://192.168.178.10:8006;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/hostname.mydomain.tld/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/hostname.mydomain.tld/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = hostname.mydomain.tld) {
return 301 https://$host$request_uri;
} # managed by Certbot

server_name hostname.mydomain.tld;
listen 80;
return 404; # managed by Certbot
}


Reply is

502 Bad Gateway​


nginx/1.18.0 (Ubuntu)

I hope that someone can give me a hint.

Greetings Wolfgang
 
I think you forgot to add the "s" for "https"
Code:
proxy_pass http://192.168.178.10:8006;
 

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!