Welcome! Log In Create A New Profile

Advanced

nginx reverse proxy to access LXD containers?

Posted by rayj00 
nginx reverse proxy to access LXD containers?
June 03, 2018 01:49PM
So, I have a VPS of Ubuntu 16.04.4 with 4 LXD containers.

Each container has to be accessed over the internet. How can the reverse proxy help me?

So if my VPS is accessed as http://www.myserver.com Ideally I'd like to be able to use this format for accessing the internal LXD containers:

http://www.myserver.com/joe to access container 1
http://www.myserver.com/frank to access container 2
http://www.myserver.com/pete to access container 3
http://www.myserver.com/bill to accesss container 4

Is this possible with nginx as a reverse proxy?

Thanks,

Ray
Re: nginx reverse proxy to access LXD containers?
June 05, 2018 11:57AM
Here is a little more detail in the attached jpg.

4 LXD containers were created on the Ubuntu 16.04 VPS.

So I want to be able to access a container based on the incoming query to the VPS.

If incoming query is http://x.x.x.x/LPC1 nginx should route to container 1. If LPC2, container 2, etc.

The containers are all app servers, no websites.

And I am not sure I formatted the incoming query ( http://x.x.x.x/LPC1) correctly?

Thanks,

Ray
Attachments:
open | download - VPS 4 Containers.jpg (16.2 KB)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 288
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