mod_ruid2 kullanarak suphp cgi modundaki kasilmanin onune gecmek arzusundayim.
yum -y install libcap-devel
wget http://downloads.sourceforge.net/project/mod-ruid/mod_ruid2/mod_ruid2-0.9.4.tar.bz2?r=&ts=1302083730&use_mirror=mesh
tar xjfv mod_ruid2-0.9.4.tar.bz2
cd mod_ruid2-0.9.4
apxs -a -i -l cap -c mod_ruid2.c
Now, if you didn't get any errors mod_ruid2 should be installed and added to the '/etc/httpd/conf/httpd.conf'.
Lets confirm mod_ruid2 is added
Quote:
grep 'mod_ruid2' /etc/httpd/conf/httpd.conf
If you get any response like below its installed
Quote:
LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so
Now we need to modify the DA httpd.conf templates a little bit to enable mod_ruid2 for the users
Now copy the template files to custom
Quote:
cd /usr/local/directadmin/data/templates/
cp virtual_host2* custom/
chown -R diradmin:diradmin custom/
Now you have copied the original templates to the 'custom' directory, so they won't be overwritten.
Now follow the steps below for each virtual_host2 file you've copied
Quote:
nano -w virtual_host2.conf
## replace line: SuexecUserGroup |USER| |GROUP|
## replace with: #SuexecUserGroup |USER| |GROUP|
## Add the lines below under the just replaced line
RMode config
RUidGid |USER| |GROUP|
RGroups apache
Save the files and lets rewrite the HTTPd config files
Quote:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
If you want you can start the rewrite of the HTTPd config files manually, just paste the line below and wait when its done
Quote:
/usr/local/directadmin/dataskq d800
After the rewrite is complete you can restart HTTPd with the command below
Quote:
/etc/init.d/httpd restart
Now mod_ruid2 should be installed and you don't need to chmod anymore like 'chmod 666 config.php' or 'chmod 777 uploads'.
To be sure the webmail clients etc still works we need to change the owner permissions
Quote:
chown -R webapps:webapps /var/www/html