If you want webalizer or awstats pages to be available by default for new domains, you can do so by creating:
/usr/local/directadmin/scripts/custom/domain_create_post.sh
In the file add the code
#!/bin/sh
ln -s ../stats /home/$username/domains/$domain/public_html/stats
exit 0;
Then chmod the domain_create_post.sh script to 755.
If you want it to be for awstats, then change the bold stats name to be awstats instead.
Source: http://directadmin.com/
Swapping between php versions when using suPHP and CLI with custombuild
If you have both suPHP and CLI installed on your system, but don’t feel like renaming all of your file.php to file.php4 (for example), there is another means to chose between php versions, without requiring to touch your php files.
To force php files to use suPHP (on the assumption your default php version uses CLI) use the following:
<FilesMatch “\.php$”>
AddHandler x-httpd-php5 .php
</FilesMatch>
This last one is on the assumption that php 5 is suPHP and CLI is php4. If php4 was suPHP, then you’d use x-httpd-php4 to force .php files to use suPHP with php 4.
Source: http://directadmin.com/
How to force php files to use CLI
To force php files to use CLI (on the assumption your default php version uses suPHP) create an .htaccess file in your public_html directory, with the following:
<FilesMatch “\.php$”>
AddHandler application/x-httpd-php .php
</FilesMatch>
As of version 4.3.0, PHP supports a new SAPI type (Server Application Programming Interface) named CLI which means Command Line Interface. As the name implies, this SAPI type main focus is on developing shell (or desktop as well) applications with PHP. There are quite a few differences between the CLI SAPI and other SAPIs which are explained in this chapter. It’s worth mentioning that CLI and CGI are different SAPI’s although they do share many of the same behaviors.
The list of command line options provided by the PHP binary can be queried anytime by running PHP with the -h switch
More: http://in2.php.net/manual/en/features.commandline.php
Cannot use SSH with old system accounts after Installation of DirectAdmin
For all SSH accounts created with DirectAdmin, it adds the “AllowUsers” option to the /etc/ssh/sshd_config file.
When DirectAdmin is installed, it will add “root” and “admin” to that file under the AllowUsers option.
Any other users who have had SSH account on the system will also require to be added to that file in order to access the server via SSH.
Source: http://directadmin.com
How to modify the open_basedir setting for one domain
To change the open_basedir value when using php in CLI mode (not suPhp), you can do so by going to:
Admin Level -> Custom httpd configuration -> domain.com
In the top text area, insert this one line:
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/usr/local/lib/php/|
which is the default value in the templates. Edit the paths in that line to meet your needs.
Source: http://directadmin.com