Welcome! Log In Create A New Profile

Advanced

Access Proxmox containers via Nginx proxy_pass

Posted by 0rx 
0rx
Access Proxmox containers via Nginx proxy_pass
May 22, 2018 11:45AM
Hello,
I have three Proxmox containers, one of them is nginx to act as redirection to other two containers. http redirection to both containers works fine. I'm stuck with https (openssl). Now I have generated cert and key only on nginx side, not on proxmox container side. This is one of two server blocks I've tried so far

server {
listen 443 ssl;
server_name example.ddns. net;
access_log /var/log/nginx/example_access.log;
error_log /var/log/nginx/example_error.log;

ssl on;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
proxy_redirect off;

location / {
proxy_pass https: //192.168.178.100;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

This shows 502 bad gateway when accessing through https: //example.ddns.net. On 192.168.178.100 is apache2 running with http configured and port 8080 is listening.

2018/05/20 19:04:48 [error] 882#882: *1 SSL_do_handshake() failed (SSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol) while SSL handshaking to upstream, client: [public_ip_here], server: example.ddns. net, request: "GET / HTTP/1.1", upstream: "https: //192.168.178.100:443/", host: "example.ddns. net"

Should I have also configure SSL on proxmox container ? Where I have apache actually. Thanks for any explanation.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready