mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +00:00
Add nginx user access documentation
This commit is contained in:
@@ -52,3 +52,18 @@ Ensure the new user can log in via SSH:
|
|||||||
- Log In as the New User:
|
- Log In as the New User:
|
||||||
`ssh newusername@your_server_ip`
|
`ssh newusername@your_server_ip`
|
||||||
- Verify that you can access the server with the new user.
|
- 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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user