From f7917ed7815c68bb732ef1b34bac8a1098477881 Mon Sep 17 00:00:00 2001 From: elAgala Date: Mon, 5 Aug 2024 00:12:38 +0000 Subject: [PATCH] Add nginx user access documentation --- create-user.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/create-user.md b/create-user.md index 60bb920..1e73ed1 100644 --- a/create-user.md +++ b/create-user.md @@ -52,3 +52,18 @@ Ensure the new user can log in via SSH: - Log In as the New User: `ssh newusername@your_server_ip` - Verify that you can access the server with the new user. + +## 6. Add Nginx user to new user group (Optional) + +If we're trying to provide static content with nginx and the folder with it is inside another user folder (/home/user), you may need to provide the nginx +user with read access to that folder. + +- Locate the user folder where the static content is located. +- Give access to the nginx user to all the users folders +```bash +gpasswd -a www-data username +``` +- Restart nginx +```bash +sudo systemctl restart nginx +```