PHP-FPM / wrong permissions among other issues.

After a fresh OS & Virtualmin install, the following occurs:

Creating a new vhost, enabling php-fpm(yes the php-fpm packages are installed) produces 404 / 503

  1. Looking at the permissions for the sockets in the /var/php-fpm, they are wrong. Owner root?
    The fpm config file needs to contain listen.owner & listen.group so the socket has the correct permissions.

  2. The apache ProxyPass syntax is also incorrect.

WRONG - ProxyPassMatch ^/(..php(/.)?)$ unix:/var/php-fpm/148909493325693.sock|fcgi://localhost/home/test.com/public_html/$

CORRECT - ProxyPassMatch ^/(..php(/.)?)$ unix:/var/php-fpm/148909493325693.sock|fcgi://localhost:9000/home/test.com/public_html

Status: 
Needs work

Comments

Which Virtualmin version are you running there? Because in the 5.07 release, we have switched away from using socket files for FPM for new domains.

If it's on the localhost, sockets avoid the network stack overhead. How about an option to use either or, which should be easily doable, it's just config options.

I totally agree - however, in my experience unix domain sockets simply don't work as documented in several popular linux distributions. So we were forced to give up on them :-(

All good, thanks Jamie for an awesome product. I'll just mangle in the changes I need etc. :D

Because in the 5.07 release, we have switched away from using socket files for FPM for new domains.

However sockets are faster than network connection, they are also are more secure.

Actualy I see FPM listenning on localhost, that means any user can write in it... and so get the permission of other users through php... right ?