Different default users for Web Server httpd, nginx and php-fpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone.
I was playing with a toy server using Fedora 26 Server. I was running a simple configuration with httpd, nginx+php-fpm trying to install and serve some CMSs to test them before going live.

Of course, only one web server was running at a time, and they both had their root pointing at /var/www/html. 
The CMSs that I tested so far were open source softwares, for example e107 and concrete5.

The main point here is that for the installation steps I needed a lot of extra configuration based on the fact that the owner of /var/www/html and subfolder was first root, then apache then nginx users. Would not be simpler to use a 'www', 'www_data' 'whatever' user account for accommodating those in an easier way?
I also had to reconfigure the php-fpm file, because otherwise configuration files in install step were not writable.

In fact, using mod_php with httpd does not create those problems, because everything is in the ownership of 'apache' user and mod_php is executed inside the httpd process.

If you switch to nginx, you actually have to run both nginx and php-fpm; because those are two different processes, you have to grant permissions to both on the same files, which to me seems unnecessary.

My situation before was:
/var/www/html -> owned by apache:apache

httpd -> running as apache:apache
php-fpm -> running as apache:apache

Switching to nginx, I had to :
/var/www/html  -> chown nginx:nginx
php-fpm running -> as nginx:nginx


Do not get me wrong, it is a matter of three commands to be issued, but would not be better not to bother with those things at all? Again, my suggestion would be to have those running on the same user name.

Let me know what you think.

Francesco
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux