DirectAdmin

Cannot use SSH with old system accounts after Installation

by admin on Sep.08, 2009, under 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.
*IMPORTANT: For systems who require the use of "su" to access the root account, but do not use "admin" to do it, that usename *must* be added to the /etc/ssh/sshd_config before logging out or else they will not be able to login and and turn won’t be able to su to root any longer. This isn’t as relevant for RedHat systems, because the default is to enable root login, but for most FreeBSD systems, su is required, and the starting use *must* be in the wheel group, which a newly created "admin" would not be.

Leave a Comment :, , , , more...

Swapping between php versions when using suPHP and CLI with custombuild

by admin on Sep.07, 2009, under DirectAdmin

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 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>

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.

Leave a Comment :, , , , more...

I want domain.com/stats to be present by default

by admin on Sep.07, 2009, under DirectAdmin

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.

Leave a Comment :, , , , more...

[warn] Init: SSL server IP/port conflict: www.domain.com:443

by admin on Sep.07, 2009, under DirectAdmin

If you get this warning in your apache logs, don’t worry, it’s perfectly normal.

[warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[warn] Init: SSL server IP/port conflict: www.domain.com:443
[warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!

The reason it’s there is because DA uses name based hosting. What that means is you’ll have many domains on one IP. The warning comes up because of the fact that only 1 ssl certificate is valid per IP address. An explanation on that can be found from the link below.
Note that these are just warnings, not errors.

Leave a Comment :, , , , , more...

How to setup per-domain Aliases

by admin on Sep.07, 2009, under DirectAdmin

If you want to disable /webmail for just one domain (for example), one way to do that is to change the Aliases to be within the VirtualHosts instead of 1 global Alias.
To do that, we’ll need to use the virtual_host2.conf template (for apache 2) and use the custom httpd config settings, found in the Admin Level. This guide assumes you’re using apache 2 with custombuild.
1) Setup the custom template so it’s safe from DA updates:

cd /usr/local/directadmin/data/templates/custom
cp ../virtual_host2.conf .

2) Edit the copied virtual_host2.conf file, and insert the following at the top of the file:

|?WEBMAIL=ON|

Then just below the token that says |CUSTOM| (in the same file) add:

|*if WEBMAIL="ON"|
Alias /webmail /var/www/html/webmail/
|*endif|

3) Go to:
Admin Level -> Custom httpd config -> domain.com
In the textarea at the top, insert this one line:

|?WEBMAIL=OFF|

which will shut off webmail for just that one domain.
4) Remove the global Alias from the /etc/httpd/conf/extra/httpd-aliases.conf file.
5) Issue a full user httpd.conf rewrite, then restart apache.

echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/etc/init.d/httpd restart

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Kontak

Budhi Indah A 31
Cimindi Cimahi 40514
West Java
Indonesia

Phone/SMS :
Info/Bantuan : 62-8158-6270622
Billing/konfirmasi : 62-8888-763551

Self Advertise


My site is worth $7548.2.
How much is yours worth?