Posted by: Master Will | August 11, 2015

Install suphp on directadmin using custombuild

While 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 set ioncube yes
./build all d
./build rewrite_confs

Note: If you just want to upgrade PHP
./build set php5_ver 5.5
./build update
./build php n

service httpd restart

Note: If you just want to build ioncube
cd /usr/local/directadmin/custombuild
./build update
./build ioncube
./build php-ini
service httpd restart

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

Source: http://servermanagementplus.com/linux-server-support/install-suphp-directadmin-using-custombuild

Useful link: http://forum.directadmin.com/showthread.php?t=29824

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: