PabloC

Well-Known Member
Mar 24, 2015
60
3
58
Mar del Plata - Argentina
cPanel Access Level
Website Owner
Hi,

I have moved to a new dedicated server (PX61-NVMe at Hetzner), with CENTOS 7.4 v66.0.25. My php handler is CGI, but I reckon it is not the best option (I have seen a couple of problems with phpBB). My server hosts mainly Wordpress and phpBB.

What php handler would you recommend me?

Thanks!
 

Muhammed Fasal

Well-Known Member
Aug 9, 2017
55
12
8
India
cPanel Access Level
Root Administrator
Hi,

Well, I would suggest you go for mod_ruid2 with DSO for better performance and security.

While SUPHP is the most secure, it is a slower way of running PHP. Upgrading to mod_ruid2 can improve performance. mod_ruid2 is an Apache module that allows all HTTP requests to a domain to run as the owner of that domain instead of as the Apache user, like suPHP but with speedups of running php as a dso. This is all because it is being used with DSO, which is dynamically compiled rather than suPHP, which is statically compiled. OPCode Caching is also possible with mod_ruid2, unlike suphp, so php pages can use xcache or eaccelerator.

There are some downsides to mod_ruid2, in most cases it is features not being used:
1) mod_userdir will not work, so /~username/ calls are not possible
2) tomcat can not be used with mod_ruid2

The benefits usually far outweight the downsides.
 
  • Like
Reactions: cPWilliamL

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
I am glad to see Muhammed was helpful. DSO with mod_ruid2 is a very efficient handler compared to suPHP. While it wasn't mentioned, one of the other caveats of mod_ruid2 is its incompatibility with CLoudLinux, as well as the fact that, currently, DSO can only be deployed on one PHP version at this time.
 

PabloC

Well-Known Member
Mar 24, 2015
60
3
58
Mar del Plata - Argentina
cPanel Access Level
Website Owner
I have a bridge installed in our main site, and talking to the developer, he tells me that it works either with CGI or FCGI, so I have no more options left.

The new question is: How do I change from CGI to FastCGI?

Thanks!!
 

PabloC

Well-Known Member
Mar 24, 2015
60
3
58
Mar del Plata - Argentina
cPanel Access Level
Website Owner
borrarcgi.jpg

I ssh apache2ctl -M and cheched that proxy_fcgi_module is on my server.

Among the warnings I read: The mod_fcgid Apache module is experimental.

"proxy_fcgi_module" is the same as "mod_fcgi"?

Could you guide me?
 

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
CGI w/suexec may be the easiest method; however, CGI does strip non-standard headers, which can be a bit annoying. FPM and FCGI may require some additional tweaking once enabled(e.g. max_children), depending on the traffic/efficiency of your application. FCGId is still marked as experimental, but I have yet to see any flaws reported with it.

You can read more about FCGId below:
Apache Module: FCGId - EasyApache 4 - cPanel Documentation