Archive for December, 2009

How to downgrade to apache 1.3.33 and php 4.3.11 in DirectAdmin

cd /usr/local/directadmin/customapache

./build clean
perl -pi -e ’s/1.3.34/1.3.33/’ build
perl -pi -e ’s/1.3.34/1.3.33/’ configure.apache_ssl
perl -pi -e ’s/2.8.25/2.8.24/’ build
perl -pi -e ’s/4.4.1/4.3.11/’ build

And then run.

./build update_data
./build all d

Try removing –with-openssl from your configure.php file and recompile php.

cd /usr/local/directadmin/customapache

vi configure.php

#remove –with-openssl from the file, save, exit.

./build clean
./build php n

This happens with the configure script for apache cannot find the “openssl” (or “ssleay”) binaries in any of

/usr/bin/openssl
/usr/sbin/openssl
/usr/apps/openssl

The usual location for “openssl” is /usr/bin/openssl

On a debian system, run

apt-get install openssl

$ which openssl
/usr/bin/openssl

Running apt-get install

root@dell:~# apt-get install openssl
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libssl-dev libssl0.9.8
The following packages will be upgraded:
libssl-dev libssl0.9.8 openssl
3 upgraded, 0 newly installed, 0 to remove and 1205 not upgraded.
Need to get 6202kB of archives.
After this operation, 197kB of additional disk space will be used.
Do you want to continue [Y/n]?

Setting up webmail.domain.com as default for new domains with DirectAdmin

1) You’ll need to setup the virtualhost for apache. This can be accomplished by adding a 2nd virtualhost along side the domains main one.

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

You’ll need to edit the newly copied virtual_host.conf (or virtual_host2.conf if you’re using apache 2) file , just add the following to the end of whatever you currently have.

</VirtualHost>
<VirtualHost |IP|:80>
ServerName webmail.|DOMAIN|
ServerAdmin |ADMIN|
DocumentRoot /var/www/html/squirrelmail
CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log
</VirtualHost>

Save and exit. Then run

echo “action=rewrite&value=httpd” >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

to rewrite the httpd.conf files.

2) You’ll also need to setup the dns portition.

cd /usr/local/directadmin/data/templates
cp dns_a.conf custom
cd custom
echo “webmail=|IP|” >> dns_a.conf

This will setup the webmail A record for new dns zones. For existing dns zones, you’ll have to manually add the webmail A record to point to the domains IP.

Source : http://directadmin.com/

How to track which site is using the apache processes.

For apache 1.3, edit your /etc/httpd/conf/httpd.conf and add

ExtendedStatus On
<Location /httpd-status>
SetHandler server-status
</Location>

just after the code that says “ServerSignature On”. Save, exit, then restart apache. You can access the stats page by going to http://192.168.1.1/httpd-status where 192.168.1.1 is your server’s IP.

If you’re running apache 2.x with custombuild, then it’s already in the file:

/etc/httpd/conf/extra/httpd-info.conf

Change the “Allow from” lines to include your IP, or remove the line completely to allow from all.

Source : http://directadmin.com/

« Prev - Next »