documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Update webserver_configuration.md

Open Kasova-code opened this issue 3 months ago • 3 comments

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.

Kasova-code avatar Sep 26 '25 07:09 Kasova-code

@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?

rowansc1 avatar Sep 26 '25 16:09 rowansc1

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.

Kasova-code avatar Sep 28 '25 08:09 Kasova-code

@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!

rowansc1 avatar Sep 28 '25 18:09 rowansc1