If you want webalizer or awstats pages to be available by default for new domains, you can do so by creating:
In the file add the code
ln -s ../stats /home/$username/domains/$domain/public_html/stats
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.
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:
AddHandler x-httpd-php5 .php
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.
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:
AddHandler application/x-httpd-php .php
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
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.
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:
which is the default value in the templates. Edit the paths in that line to meet your needs.