1 (edited by thomas@limitis 2019-10-07 14:14:00)

Topic: HTTPD autostart PHP-FPM

Hello,
I have installed a fresh Centos 8 with httpd and all versions of PHP available from your repo.


What I'd like to disable, is the autostart of all php-fpm daemons on start of Httpd.
Simple deleting the files in /usr/lib/systemd/system/htt.pd.service.d (ignore the dot in htt.pd as forum software sees a link and will not let me post) will do the job until an update, I presume.

So how do I disable this? As we'd like to start a dedicated master process for every web we have on this server.

Regards,
Thomas

Re: HTTPD autostart PHP-FPM

> Simple deleting the files in /usr/lib/systemd/system/htt.pd.service.d (ignore the dot in htt.pd as forum software sees a link and will not let me post) will do the job until an update, I presume.

Still the only simple way I see for now

Autostart is there to make simpler switch from mod_php to php-fpm for "most" users...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: HTTPD autostart PHP-FPM

BTW, Why a "master" process per site, a "pool" should be enough ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: HTTPD autostart PHP-FPM

Thanks for the answer.

I thought to use a Master for every web, because of OpCache. I have read that it can have security issues when OpCache and multiple pools is used in a sharing hosting environment.
There is the option 'opcache.validate_permission' to mitigate this but it put's strain on the disks. But I have seen that with many 'masters' the RAM consumption get's quite high so we will stay with 'pools' anyway.

Please correct me if I'm wrong :-)

Re: HTTPD autostart PHP-FPM

shared hosting can never be really secure wink

> There is the option 'opcache.validate_permission' to mitigate this but it put's strain on the disks.

yes

> But I have seen that with many 'masters' the RAM consumption get's quite high

indeed

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: HTTPD autostart PHP-FPM

Ok, thanks.
Regards,
Thomas