Apache + SUEXEC and PHP-FPM

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.5
Webmin version 2.202
Virtualmin version 7.30.4
Webserver version 2.4.52
Related packages PHP

Hi guys.
I’m sorry if I wanna ask some basic question that made me confused. :upside_down_face:

Is it important or is it fine if we use PHP-FPM with Apache SUEXEC enabled? Or is there another option to reach fastest and secure multiple domain hosting?
What’s the reason? Thank you. :slightly_smiling_face:

PHP-FPM does not run under Apache, and thus is not subject to suexec. FPM runs as the domain owner user for each domain (it is similarly safe to using suexec).

FPM is the recommended execution mode, and it is developed and maintained by core PHP developers under the umbrella of the PHP project. There is no better way to run PHP.

So if I use PHP-FPM, I don’t need Apache suexec anymore to have fast and secure web hosting?
Or does suexec add another layer of security for hosting that use PHP-FPM?

That doesn’t make any sense. PHP-FPM does not run under Apache, as I said. suexec is for Apache running things (mod_fcgid or mod_cgi, for example). PHP-FPM is its own application server independent of Apache, and Apache proxies to it.

Just use PHP-FPM.

Thanks for the answer. Now, I’ll disable suexec on Virtual Server with PHP-FPM enabled. :+1:

Btw, is there a way to make Virtual Server with PHP-FPM enabled more secure rather than just keep it up to date?

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.