How to install and configure apache mod_ruid on ISPConfig3 machine
What is mod_ruid?
mod_ruid is suexec module for apache 2.0, based on mod_suid2, which change apache process UID. It has better performance than mod_suid2 because it doesn`t need to kill httpd children after one request. It makes use of kernel capabilites and after receiving a new request suids again. It is faster that fcgi+suexec or suphp.
Lets go ahead
We need compile mod_ruid package. For it we need install two packages libcap-dev and apache2-prefork-dev
Code:
aptitude install libcap-dev apache2-prefork-dev
After installing download mod_ruid from this page
http://websupport.sk/~stanojr/projects/mod_ruid/
Code:
cd /tmp
wget http://websupport.sk/~stanojr/projects/mod_ruid/mod_ruid-0.6.tar.gz
tar -xzvf mod_ruid-0.6.tar.gz
and compile...
Code:
apxs2 -a -i -l cap -c /tmp/mod_ruid-0.6/mod_ruid.c
bash -c 'echo "LoadModule ruid_module /usr/lib/apache2/modules/mod_ruid.so" > /etc/apache2/mods-available/ruid.load'
bash -c 'echo -e "RMode stat\nRMinUidGid #100 #100\nRDefaultUidGid www-data www-data" > /etc/apache2/mods-available/ruid.conf'
a2enmod ruid
/etc/init.d/apache2 restart
Configure ispconfig vhost
Open vhost.master.conf file
Code:
nano /usr/local/ispconfig/server/conf/vhost.conf.master
and after this
Code:
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId <tmpl_var name='system_user'> <tmpl_var name='system_group'>
</IfModule>
insert this to each vhost (non-ssl and ssl)
Code:
# add support for apache mod_ruid
<IfModule mod_ruid>
RMode config
RUidGid <tmpl_var name='system_user'> <tmpl_var name='system_group'>
</IfModule>
Thats all, you need recreate vhost files by ispconfig - simple open each website, disable suexec and set PHP to mod_php and save it.
(If you use mod_ruid, them you cant use suphp on any vhost)
Google docs:
https://docs.google.com/document/pub...N5G9qzr6CmZN7k
Recent comments
1 day 3 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
2 days 5 hours ago
2 days 6 hours ago
2 days 10 hours ago