What is mod_ruid2?
Traditionally there have been 2 basic ways to run PHP under Apache:
This has traditionally been the fastest (and easiest) way to run PHP - a copy of the PHP interpreter is "embedded" right in the Apache process - this lets Apache handle PHP scripts right inside the same process and memory it is already using, which is fast.
The downside is that users can easily run into permission issues since the web server is not running under the same user account as the user.
CGI / FastCGI
CGI stands for "Common Gateway Interface" and it functions as its name implies - this is a "common" way to get Apache talking to external language interpreters (PHP, Perl, Python, etc.) - it does this over a "gateway interface" - i.e. when Apache receives the request it sees if it has a registered handler for the file type - if it does it passes the script over to the interpreter, gathers the results and sends the output back out to the client.
The problem is that this is SLOW - every single request causes a new "interpreter" process to be spawned on the server, which slows things down.
Many hosting providers however use this method since it allows for better isolation of user processes, and generally is a better setup when running different user scripts on the same server (think big shared hosting server with hundreds of users on it), as it uses the underlying Linux file system permissions to keep the user scripts nicely separated.
There is however another way to run PHP under Apache that gives you the best of both worlds - the speed of mod_php and the security of CGI:
and as they say (rather humbly):
"mod_ruid2 is a suexec module for apache which takes advantage of POSIX.1e capabilities to increase performance."
Note: for those of you wondering why I didn't mention FPM, just hold your horses - I'll be covering FPM setup under the (hopefully coming soon) guide to running Jamroom 5 under Nginx.