Using a custom VirtualHost template in DirectAdmin
If you wish to change the setup of the VirtualHosts for all domains, you can do so by creating your own custom templates.
cd /usr/local/directadmin/data/templates
cp virtual_host*.conf custom
cd custom
Once you’ve copied the 4 VirtualHost files (or just the ones you want) to the custom directory, you can then edit the new files you’ve just copied. DirectAdmin will always check for the custom file before going to the default ones. Failure to copy the virtual_host*.conf files to the custom directory before modifying them will result in a loss of all changes when DirectAdmin updates itself (the files are overwritten).
Once you are happy with your new virtual_host*.conf files they’ll need to be used in the real httpd.conf files. You can trigger DirectAdmin to rewrite all User httpd.conf files by running:
echo “action=rewrite&value=httpd” >> /usr/local/directadmin/data/task.queue
The command will be added the the task queue which is checked once per minute, so it may be a few minutes before all httpd.conf files have been rewritten. *Note: the main /etc/httpd/conf/httpd.conf is never overwritten (unless DirectAdmin is reinstalled) so any changes you make will be safe.
Source: http://directadmin.com/
Tags: Custom, DirectAdmin Support, t template, VirtualHos
Updating Apache to the latest version in DirectAdmin
If you wish to update your 1.3 version of apache to the most recent, run the following:
cd /usr/local/directadmin/customapache
./build clean
./build update
./build apache_mod_ssl
If you’re using apache 2.x, use “./build apache_2″ isntead of apache_mod_ssl.
This should update both the configure options and the version of apache to the most recent version. Once the update has completed, you’ll need to restart apache:
You can check the current version of apache by running
Restart Apache.
/sbin/service httpd restart
Source : http://directadmin.com/
Tags: Apache, latest, Updating, Version
Script to enable SpamAssassin for new accounts
By default (if enabled), DA gives the User the option to enable spamassassin, but it is not turned on by default.
The above script can be used to also enable spamassassin for all existing accounts. You can create another simple script to do it called (for example) spam.sh with the following code:
#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
username=$i spam=ON /usr/local/directadmin/scripts/custom/user_create_post.sh
};
done;
exit 0;
Save this new spam.sh script, chmod it to 755, and run it once.
Tags: Accounts, Script, SpamAssassin
How to enable realtime blocklists (RBLs) with exim
To enable RBL blocking, as root, run the following:
cd /etc/virtual
rm -f use_rbl_domains
ln -s domains use_rbl_domains
This will setup the list of domains to be filtered to match the active domains list, so new domains added to the server are also included for the spammer IP blocking.
The RBLs will connect out to remote servers for each email, check to see if the sending IP is a spammer, and prevent that email from arriving. These lists are regularly updated, so they are highly effective.
Note that some lists also block entire ISP IP ranges, so if your clients are not able to send email, then can switch to sending email through port 587 instead of port 25.
or to disable RBLs, you can do the followig:
cd /etc/virtual
rm -f use_rbl_domains
touch use_rbl_domains
Source : http://directadmin.com/
Tags: (RBLs), blocklists, exim, realtime
Uisng quotacheck program in DirectAdmin
DirectAdmin relies on the system quotas to return a value for how much space is being used.
DirectAdmin will run
If the “used” column is not showing anything, or users are not in the list, then you’ll need to run the quotacheck program:
Redhat:
/sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;
FreeBSD:
/usr/sbin/quotaoff -a; /sbin/quotacheck -avug; /usr/sbin/quotaon -a;
If are getting errors and no output is displayed for the repquota command, you’ll need to check your /etc/fstab file to make sure that it contains the rw,userquota,groupquota line beside the partition that is using the quotas.
Important: On Linux (Redhat/Debian), it’s usrquota,grpquota, and on FreeBSD it’s userquota,groupquota.
Reference : http://directadmin.com/
Tags: DirectAdmin Support, program, quotacheck