enable http2 but disable mod_ruid2,mod_mpm_prefork,mod_cgi

Gojko

Well-Known Member
Nov 24, 2014
112
7
68
Macedonia
cPanel Access Level
Root Administrator
Hello, i want to enable http2 BUT i need to disable mod_mpm_prefork,mod_ruid2,mod_cgi

This is produce server so i can't playing around with testing.
What is bast practice with this?
What is replacement for prefork ruid and cgi?

I read a lot to replace prefork and someone wrote that will disable htaccess.

What is bast thing to do?

Last WHM/cPanel all updated. CentOS 7. If you need any information please tell.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

You can read about some of the configurations others have used when switching from Prefork/Ruid2 on the following thread:

Prefork and HTTP2

Thank you.
 

Gojko

Well-Known Member
Nov 24, 2014
112
7
68
Macedonia
cPanel Access Level
Root Administrator
Thank you, i read it all but i have some concerns like
"So, I tried it with mod_mpm_event noticed that mod_ruid2 is disabled and I would have make permission changes on directories and files so websites can work properly."

What he mean about it?

PHP handlers i have only "cgi" and i have fast cgi module installed.

if i switch to mpm event is there any other change beside permission?
that is server with 200+ accounts and more then 250+ domains
all php versions work on event? i need 5.6,7.0,7.1. 90% websites are wordpress on server
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

You should not encounter that same issue if you are not using Mod_Ruid2. Switching to the Event MPM from the Prefork MPM should not lead to changes in the required permission or ownership values. You can read more about each PHP handler at:

PHP Handlers - EasyApache 4 - cPanel Documentation

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
But i'm using ruid2. So when i swich to event i will disable ruid2, what i need to do to change permission or ownership for all accounts?
PHP handlers i have only "cgi" and i have fast cgi module installed.
Hello,

Can you confirm if you are using PHP-FPM, or the mod_fcgid Apache module? The mod_fcgid Apache module is not compatible with Mod_Ruid2, so you wouldn't be able to have both enabled at the same time.

Thank you.
 

linux4me2

Well-Known Member
Aug 21, 2015
259
80
78
USA
cPanel Access Level
Website Owner
Just thought I should mention that if the OP is thinking of disabling Mod_Ruid2 to enable HTTP2, some other symlink race condition protection might be worth thinking about before proceeding if the only protection is currently from Mod_Ruid2.
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463

Gojko

Well-Known Member
Nov 24, 2014
112
7
68
Macedonia
cPanel Access Level
Root Administrator
So what i need to do?
I need to disable mod_cgi?
turn on php-fpm?
disable mod_ruid2?
turn on http2?
and i still have to do something with permission files/folders because of mod_ruid2?


cgi1.PNG cgi2.PNG cgi3.PNG
cgi4.PNG
cgi5.PNG
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

Here's a link with more information about each PHP handler (including information about the permission requirements):

PHP Handlers - EasyApache 4 - cPanel Documentation

Based on the information you provided, you are using the CGI handler with Mod_Ruid2 enabled. Thus, if you were to enable Mod_Http2, you'd still use the CGI handler but Ruid2 would no longer be enabled. Per the above document:

If you install the suEXEC module, the system executes PHP applications as the user that owns the VirtualHost that served the request.

If you uninstall the suEXEC module, the system executes PHP applications as the nobody system user.
I recommend enabling suexec when configuring your new profile in the EasyApache 4 interface so the system still executes PHP applications as the user that owns the VirtualHost that served the request.

Note that you also have PHP-FPM enabled, so you may want to browse to "WHM >> MultiPHP Manager" to verify if any of your domain names are using PHP-FPM as their handler.

Thank you.
 

Gojko

Well-Known Member
Nov 24, 2014
112
7
68
Macedonia
cPanel Access Level
Root Administrator
Thank you for replay. I'm sorry for i'm late for this replay.

No one use PHP-FPM.
So what i need to do is:
Disable mod_ruid2
Enable suexec
Eneble http2

is that right?
also i read all that stuff before but i don't want to make mistake because it's big problem if domains stop working until next replay on post.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Disable mod_ruid2
Enable suexec
Eneble http2

is that right?
Hello,

That's correct. Note that should you encounter compatibility issues, you can use "WHM >> EasyApache 4" to uninstall HTTP2 and reinstall Mod_Ruid2 again to ensure your system reverts to the previous configuration.

Thank you.