Simple nginx config - eviltoast

Hello all!

I finally got my Lemmy instance up and running yay!

It runs on a local machine, I have nginx installed and my website pointing onto it.

lemmy.mindoki.com => my_static_ip(port 80) => local_ip => nginx

In ngunx I just set up a hello world message, and it works out. lemmy.mindoki.com shows it.

Now, my Lemmy instance is accessible on 0.0.0.0:1236 but obviously only from inside the hosting machine itself.

I have tinkered a bit with the nginx.conf but I feel there is lot of things to do wrongly, especially as it’s ‘dynamic’, but also it seems like a schoolbook example (for Lemmy, so no hits on my favourite search engine), so maybe someone has a working nginx.conf file to spare for a basic setup like this?

Thanks a bunch!

  • phoenix591@lemmy.phoenix591.com
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    you tell it what you mean by lemmy and lemmy-ui earlier in the config file outside of the server {} block

    upstream lemmy {
    # this needs to map to the lemmy (server) docker service hostname
    server “127.0.0.1:8536”;
    }
    upstream lemmy-ui {
    # this needs to map to the lemmy-ui docker service hostname
    server “127.0.0.1:1234”;
    }