If you have an RSA PRIVATE KEY then you would have a password encrypted key.

This will not work with DirectAdmin since it would require someone to type in a password each time apache restarts.

You do not have to start over, you can convert this password protected key into a normal key by typing:

openssl rsa -in /path/to/your/key -out /the/new/key

where you’d replace the bold values with appropriate values.

This will ask you for the password you specified when you created the original key.
It will then create a non-password-protected key that you can use for DA.

Source: http://directadmin.com/

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

« Prev - Next »