I've reached a road block I just cant seem to overcome and I believe it is because I don't understand how reverse proxies work. Some background: I run Ubuntu 19.04 Server on an Optiplex 3040 with 12gb RAM 120 GB SSD internal and a few terabytes storage via USB HD's. Domain certs have been provided and confirmed via LetsEncrypt.
I intend to use this machine as a home server. Ideally I want it to be as follows:
Host: Ubuntu 19.04 Server running DDClient to update my domain with my dynamic public IP. Requests are made to the host on 80/443 and then forwarded via LXD's proxy device to my HAProxy container.
The HAProxy container is running Ubuntu 18.04 with the following config (for now):
haproxy.cfg
As I understand this, if one were to navigate to "airsonic.domain.com" it should then be forwarded to Airsonic.lxd:80 (though what I don't understand is that shouldn't it be forwarded on 443 since I have the certs?)
From there, the Airsonic container running Ubuntu 18.04 w/ NGINX should pick it up via the NGINX reverse proxy:
NGINX conf
This **should** provide me with "https://airsonic.domain.com:8080/airsonic" when navigating to "http://airsonic.domain.com"
Code:
Instead I get the following error:
This site can’t be reached airsonic.domain.com
refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
So does anyone have any idea of whats going on? Secondary question, is it proper to have both the HAProxy container and the Airsonic container referring to the same certs?
Thank you!