suyashkumar / ssl-proxy

:lock: Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
MIT License
735 stars 88 forks source link

does it support multiple sites in one ip address ? #32

Open changchichung opened 4 years ago

changchichung commented 4 years ago

when I have only one site need to do reverse proxy , ssl-proxy works like a charm ! but I have no idea how to run ssl-proxy for multiple sites in one public ip ? eg something like w1.abc.com 127.0.0.1:4000 w2.abc.com 127.0.0.1:5000

I can do ssl-proxy -from 0.0.0.0:443 -to 127.0.0.1:4000 -domain w1.abc.com, but how to add w2.abc.com ?

is it possible to do so ?

suyashkumar commented 4 years ago

if w2.abc.com has an A record that points to the same server, ssl-proxy won't be able to support proxying traffic separately between the two subdomains. This is something I can look into supporting, but it sounds like you might want to look into a more configurable proxy with more advanced settings like nginx (ssl-proxy right now is meant to be a simple, lightweight, essentially no config ssl-secured reverse proxy). If other folks also would like support for this, please thumbs up the comment, and I can use that as a gauge of interest! :)

Of course keep in mind that you can always run multiple instances of ssl-proxy on one server (but keep in mind ssl-proxy alone won't be able to handle different subdomains, but can handle proxying data for different ports)

KhazAkar commented 2 years ago

Of course keep in mind that you can always run multiple instances of ssl-proxy on one server (but keep in mind ssl-proxy alone won't be able to handle different subdomains, but can handle proxying data for different ports)

So with something like that: ssl-proxy -from 0.0.0.0:443 -to 127.0.0.1:5000 -domain kallithea.wyseserver.home ssl-proxy -from 0.0.0.0:443 -to 127.0.0.1:8080 -domain nc.wyseserver.home ssl-proxy -from 0.0.0.0:443 -to 127.0.0.1:9090 -domain cockpit.wyseserver.home

Will work? Or it's needed to have different -from directives?