Isolated PHP-FPM in use?

sparek

Verified User
Joined
Jun 27, 2019
Messages
592
I'm taking a deeper dive in understanding DiretAdmin's Isolated PHP FPM Mode. I'm having trouble reconciling some things, I'm sure it's just in my understanding but hoping to get some clarity.

How are you suppose to know if Isolated PHP FPM mode is actually in use?

According to the configuration, isolated_fpm is enabled:

# /usr/local/directadmin/directadmin config-get isolated_fpm
1


But I'm not seeing any stand-in sockets for the user on the server (this is a test server, I just have one user setup on it at the moment).

PHP works - but I'm just not sure if isolated php-fpm is being used.

If I disable the php-fpm83.service service:

# systemctl stop php-fpm83.service

Then PHP stops working for the user.

This is leading me to believe that isolated php-fpm isn't being used. PHP is just being run through the main php-fpm83 service.

So this begs the question. How do you actually know isolated php-fpm is actually being used?
 
Found it.

So jail has to be enabled for the user
# cat /usr/local/directadmin/data/users/%user%/user.conf | grep ^jail=
jail=ON


Rebuild httpd.conf because this changes the socket that the user connects to in their Apache configuration.

Next question though...

This creates two socket files:

/run/php-fpm/php83-%uid%.sock
/run/php-fpm/php83-%username%.sock


Best I can tell the uid one is used. Where is the username used? Or is it just superfluous?
 
I think the /run/php-fpm/php83-%username%.sock was a left over remnant of me trying to figure out how the socket got populated. The system is actually based on UID and not username.
 
Back
Top