• d3Xt3r@lemmy.nz
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    11 months ago

    Okay so that’s different.

    nginx only runs the master process as root, but the actual worker processes already run under a low-privileged account called http. If you want to run the master process as well as non-root, you can follow the instructions here: https://wiki.archlinux.org/title/nginx#Running_unprivileged_using_systemd

    To restrict access to files, you’d be editing the nginx config file, you can read on how to do that in the nginx documentation, or check ServerFault etc.

    But the modern Linux world revolves around containers. There’s an official Docker image for nginx that you could use if you’d like, and that’d make it a much more secure - and portable option.

    Also, I’d recommend checking the Arch Wiki first for anything Linux related - the wealth of knowledge and documentation there is unmatched, and is useful even if you’re not running Arch.

    • Darkassassin07@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      Thanks for your help m8, I appreciate it.

      I’ll have to do some more reading once I’ve got some time.