Skip to content

Conversation

@Kasova-code
Copy link

Added a note in both “Nginx With SSL” and “Nginx Without SSL” sections explaining that on Ubuntu systems it may be necessary to run sudo usermod -aG www-data nginx to ensure proper permissions.

Added a note in both “Nginx With SSL” and “Nginx Without SSL” sections explaining that on Ubuntu systems it may be necessary to run `sudo usermod -aG www-data nginx` to ensure proper permissions.
@rowansc1
Copy link
Contributor

@Kasova-code Thanks for the MR! However, doesn't nginx run under the www-data user on Ubuntu? You can change this in the config file at /etc/nginx/nginx.conf, but I wouldn't see any benefit in that.

Could you elaborate on your changes?

@Kasova-code
Copy link
Author

In my case, Nginx was running under the nginx user, which wasn’t part of the www-data group. Because of that, it couldn’t access the PHP-FPM socket, and I ran into a 503 error after following the setup instructions.

Adding the nginx user to the www-data group resolved the issue. As a beginner, this was unexpected and not obvious at first, so I thought it might be helpful to mention this edge case for others who might encounter the same problem.

Let me know if you'd prefer this info to be added elsewhere or need more details.

@rowansc1
Copy link
Contributor

@Kasova-code - No worries at all! I can see this being a useful troubleshooting step, but as it doesn't affect most users, we probably shouldn't include it on this page to avoid confusion.

Perhaps this would be better to include on the troubleshooting page? At the bottom of that page, we could include the error, and also stipulate the circumstances under which different users apply. For example, Ubuntu is commonly www-data, but with an exception in your case. And redhat based distros tend to be the nginx/apache user.

Open to other peoples thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants