If you have one domain name, that is fine. However, if you have
multiple domain with multiple website, but you only have one physical
machine (also means you only have one public ip address). The way to
deal with this is to do a little bit setup in nginx.conf
My original setup
I have a machine that hosts my blog (which is this one) at
https://www.tragicmaster.website. So my original setting (also can see
in my SSL build blog here.
location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } }
And now I have a container running on localhost:8000, which is my
second website that I want other people to access.
I tried several ways while this works for me: I create another
setting so that when nginx see the domain name that I use is
'https://www.duber.site', it will redirect to the localhost:8000.