So, I have some idea on what a reverse proxy does and will be using nginx (with the neat proxy manager UI) for my setup.

However, I’m not completely clear what exactly I want it to do and how I cn use it to run different services on one machine. I’m especially unclear on the ports configuration … tutorials will say things like “change the listening port to xxx for that service and to port yyy for the other service”

How does this work, which ports can I use and how do I need to configure the respective services?

EDIT: thanks everybody, your replies did help me a lot! I have my basic setup now up and running using portainer + nginx + fail2ban.

  • bdonvr@thelemmy.club
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You can already do that without a reverse proxy.

    A reverse proxy allows you to have multiple services running on 0.0.0.0:XXXA

    For example you might have two websites at a server on 192.168.0.123

    Your server will be setup to show those websites at two different ports, say “192.168.0.123:123” and “192.168.0.123:321” - with foo.com on 123 and example.net at 321

    Your reverse proxy will listen to requests on port 80 (where websites are usually served) and look at each request. If it’s a request for the website at foo.com, it’ll send it to port 123. If it’s a request for example.net it will send it to port 321

    But the client who is requesting the sites will only see port 80, at the same IP address for both sites.