LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 03-01-2017, 12:35 PM   #1
simosx
Member
 
Registered: Jul 2005
Posts: 66

Rep: Reputation: 11
Talking LXD container tutorial on creating many HTTPS websites


Hi All,

I wrote last year a tutorial on LXD on how to create many HTTPS websites on a single server,
https://blog.simos.info/how-to-set-u...xd-containers/

There is generally some difficulty to have more than one HTTPS website on a single IP. This is resolved nowdays using something called SNI and a TLS Termination Proxy. In this tutorial I use HAProxy as the TLS Termination Proxy.

My next endevour is to write a tutorial on how to install multiple WordPress sites under LXD.
I am still trying to figure out the details on this one.
 
Old 03-02-2017, 07:27 AM   #2
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Quote:
Originally Posted by simosx View Post
Hi All,

I wrote last year a tutorial on LXD on how to create many HTTPS websites on a single server,
https://blog.simos.info/how-to-set-u...xd-containers/

There is generally some difficulty to have more than one HTTPS website on a single IP. This is resolved nowdays using something called SNI and a TLS Termination Proxy. In this tutorial I use HAProxy as the TLS Termination Proxy.

My next endevour is to write a tutorial on how to install multiple WordPress sites under LXD.
I am still trying to figure out the details on this one.
Running multiple sites with HTTPS on a single IP does not require a proxy - it requires simply the use of TLS as the security component. With TLS, you have access to the SNI extension (this is where TLS is truly different from SSL - extensions) whereby the browser tells the server which site it is trying to connect to BEFORE certificate information is leveraged to create a secure channel. 100% of the required configuration can be done in Apache directly.
 
1 members found this post helpful.
Old 03-07-2017, 03:52 PM   #3
simosx
Member
 
Registered: Jul 2005
Posts: 66

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by ember1205 View Post
Running multiple sites with HTTPS on a single IP does not require a proxy - it requires simply the use of TLS as the security component. With TLS, you have access to the SNI extension (this is where TLS is truly different from SSL - extensions) whereby the browser tells the server which site it is trying to connect to BEFORE certificate information is leveraged to create a secure channel. 100% of the required configuration can be done in Apache directly.
In the tutorial I am running HAProxy as a TLS Termination Proxy (https://en.wikipedia.org/wiki/TLS_termination_proxy).

And HAProxy uses SNI in order to direct each client to the correct container. (There is no other way to have HTTPS on a single IP address without SNI).

The benefit of HAProxy is that all Let's Encrypt certificate management happen in the HAProxy container. The websites (nginx in my example) do not need any HTTPS configuration, therefore I do not need to replicate the complex HTTPS settings that can achieve A+ on the Qualys SSL Test (https://www.ssllabs.com/ssltest/).
 
Old 03-07-2017, 04:09 PM   #4
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
I fully understand what you're doing. The "secret sauce" here, however, is NOT the proxy - it's the use of SNI which requires TLS.
 
  


Reply

Tags
container, haproxy, lxc, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Understanding LXC and LXD, Canonical's Open Source Container Solution LXer Syndicated Linux News 0 04-15-2016 11:03 PM
LXer: LXD Is the New Pure-Container Hypervisor for Linux, Says Mark Shuttleworth LXer Syndicated Linux News 0 09-17-2015 06:32 PM
LXer: Canonical Launches LXD Open Source Virtualization Container LXer Syndicated Linux News 0 11-06-2014 02:41 AM
LXer: Ubuntu is working on a new secure container hypervisor: LXD LXer Syndicated Linux News 0 11-04-2014 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration