What is Mod_ruid2?

Posted at November 11, 2016 at 12:57 pm by Jithin

The mod_ruid2 is a suexec module for apache web server. The mod_ruid is used to provide the website an improved performance with greater security. This means the mod_ruid2 makes the websites load faster and also increase the security of the website.

Let’s have a detailed look on the mod_ruid2 in this article. It will help you to understand more about this in order to use module effectively.

In later days, there were two basic ways to run the PHP under Apache. They are described below.

1) mod_php

2) CGI/FastCGI


The mod_php

The mod_php is the easiest way to run PHP with the Apache.  It was the fastest way of running PHP. As the name indicates, in this method, the PHP is running as an Apache module. How the mod_php work is a copy of the PHP interpreter, embedded in the Apache process. The advantage (also disadvantage) of using this method is that Apache handles the PHP scripts right inside the same process and memory that it is using already. There is no need to start a new process which will take additional memory for it to run.



The alternative methods to mod_php are CGI and FastCGI. The CGI stands for “Common Gateway Interface”. Like the PHP, it handles other external language interpreters also. This includes Perl and Python. When Apache receives a request to execute any of these, it will check whether a handler is registered to run the particular script. If the script is passed to the interpreter, after it completes execution, the result is gathered and the output is sent back to the client.

The main drawback of CGI/FastCGI is that this method is comparatively slow. In this method, every request will cause new “interpreter” process to be spawned on the server. If it goes beyond a certain limit, the server can overload.

Although it will reduce the performance, it is used by the hosting providers because it will isolate each user effectively.  Every user processes is isolated, so it is considered as better method to use.  It is often used in the shared servers. The separation is acquired by using the underlying Linux file system permissions to keep the user scripts separated.


The mod_ruid2

The mod_ruid2 is defined as it is an suexec module for Apache which takes the advantage of POSIX.  It ensures better performance and better security when used with Apache.


How to install mod_ruid2

1) Download the mod_ruid2.


Run this command to download the file.

# wget http://osdn.net/frs/g_redir.php?m=kent&f=%2Fmod-ruid%2Fmod_ruid2%2Fmod_ruid2-0.9.8.tar.bz2

2) Extract the tar file downloaded.

# bunzip2 mod_ruid2-0.9.8.tar.bz2

# tar xvf mod_ruid2-0.9.8.tar.bz2

3) Go to the directory “mod_ruid2-0.9.8”

# cd mod_ruid2-0.9.8

Now build the mod_ruid2 module using the apache’s apxs2 utility. To achieve this, run the following command.

/usr/bin/apxs2 -a -i -l cap -c mod_ruid2.c

After the successful installation of mod_ruid2, you will see lines scrolling. You could ensure that the mod_ruid2 is installed successfully.


If you need any further assistance please contact our support department.



0.00 avg. rating (0% score) - 0 votes

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply