You cannot forward the same port on the host to multiple instances, so whilst there’s nothing stopping you from adding the proxy device to your profile, only the first running instance will be able to start.
You should add a per instance proxy device using a different host side listen address or port, or run something like nginx or haproxy to perform HTTP level reverse proxying based on requested domain name.
Thanks, so I’ve to modify http and https port for each container with in my NGINX , is there any other way where I can tell LXD to use port 80 & 443 for all my containers ?
Than again, what is point of having public interface listening on ports 81,82 etc… ? Not sure what is enviroment like but if this is public Web servers and you have routed public IPv6 subnet just use that and make something like Cloudflare translate IPv6 <> Ipv4. That is what I do for over a year now.
The proxy device just forwards connections it is not an L7 reverse proxy, so it doesn’t understand the http protocol so you can’t have multiple proxies listening on the same address and port on the lxd host.
After spending a lot of time, I was able to configure this and I wrote a blog about it How to setup LXD with HA Proxy with full configuration , if any one need to setup the same, be my guest to use the configuration, you can use ssl and http . All the best & Thank you every one