Install suphp on directadmin using custombuild

directadmin-suphpWhile managing DirectAdmin server  you might sometime want to change the php handler to suphp instead of default mod_php. Because suphp provides better protection to server than mod_php because it runs the php scripts under the user account instead of default user apache. DirectAdmin custombuild provides a very easy way to do it.

cd /usr/local/directadmin/custombuild/
./build set php5_cgi yes
./build set php5_cli no
./build all d
./build rewrite_confs

Now after suphp is installed on the server. You will need to fix phpMyAdmin, Roundcube and squirrelmail

./build roundcube
./build squirrelmail
./build phpmyadmin

No you can fix the permissions of all the files and folders of the users.

for i in `/bin/ls /usr/local/directadmin/data/users/` ; do chown -R $i.$i /home/$i/domains/* ; echo $i ;done 
for i in `/bin/ls /usr/local/directadmin/data/users/` ; do find /home/$i/domains/ -type f -exec chmod 644 {} \; ; echo $i ;done
for i in `/bin/ls /usr/local/directadmin/data/users/` ; do find /home/$i/domains/ -type d -exec chmod 755 {} \; ; echo $i ;done

Managing a DirectAdmin server can be difficult task for a single person. If you want a experienced team of system administrators to manage your directadmin server then please take a look at our DirectAdmin Server Management Service plan.


Sreejit is the founder of Server Management Plus. His motto is "If there's an easier way, Why do it any other way" and following it, he has created a lots of automation scripts for the company using which we are able to resolve issue at an extremely fast rate and save lots of time. He has a very keen interest in new technologies and spend most of his free time online researching about it apart from listening music and watching movies.