0

Does nginx require an Ubuntu user for each server block? Is it considered good practice to do so even if it's not a requirement?

I plan on storing the files for each domain in /var/www/somedomain.com/public_html, not in any given users home folder.

1 Answer 1

1

Short answer is "No, it doesn't".

Nginx use one user, who called www-data. That user should have access to files in /var/www/somedomain.com/public_html.

So you just need to set correct permission rules to files and configs in /etc/nginx/sites-available.

Also I wouldn't recommend to create user for each server block if there is only your sites.

You may create some extra users in your system if it's public webserver and some remote users will connect to this server to configure new websites, but anyway do not create user for each server block.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .