FreeBSD host, multiple jails, many with web servers

freebsd at boosten.org freebsd at boosten.org
Fri Jul 5 15:25:53 UTC 2019



> Op 1 jul. 2019, om 18:24 heeft Dale Scott <dalescott at shaw.ca> het volgende geschreven:
> 
> BSD Now episode 259 has a segment on running multiple services using jails and a single public IP address. It’s on my Todo list to listen again and re-configure my own server. 
> 
> https://www.freebsdnews.com/2018/08/17/bsd-now-episode-259-long-live-unix/
> 

This is not going to work for OPs question. I just had a look, and this podcast basically points to this web page:

https://www.davd.io/posts-freebsd-jails-with-a-single-public-ip-address/ <https://www.davd.io/posts-freebsd-jails-with-a-single-public-ip-address/>

The writer of this article uses pf to redirect different ports to different jails, which is fine, assuming that every jail serves different services (so a jail offering smtp, a jail offering a webserver, a jail offering mysql), however if you want to have multiple jails serving a webserver, you only can redirect port 443 (or 80) once.

You will need a reverse proxy to redirect services based on the name to different jails. Shouldn’t be too hard, I guess.

A quick search on google found me this one:

https://serverfault.com/questions/706694/use-nginx-as-reverse-proxy-for-multiple-servers <https://serverfault.com/questions/706694/use-nginx-as-reverse-proxy-for-multiple-servers>

Peter



More information about the freebsd-questions mailing list