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/
How to downgrade from apache 2 back to apache 1.3
If you need to go back to apache 1.3 after installing apache 2, you’ll need to do the following:
1) Restore the old httpd.conf file:
cp -f /etc/httpd/conf/httpd.conf.1.3.backup /etc/httpd/conf/httpd.conf
2) Get DirectAdmin to use the old httpd.conf files for the users. Edit the /usr/local/directadmin/conf/directadmin.conf file and change apache_ver=2.0 to apache_ver=1.3. Also, if you were using custombuild, and are going back to customapache, the apache_conf value needs to be reset to:
apacheconf=/etc/httpd/conf/httpd.conf
Then type
echo “action=rewrite&value=ips” >> /usr/local/directadmin/data/task.queue
echo “action=rewrite&value=httpd” >> /usr/local/directadmin/data/task.queue
echo “action=directadmin&value=restart” >> /usr/local/directadmin/data/task.queue
3) Now you can recompile apache 1.3
rm -f /usr/lib/apache/*
cd /usr/local/directadmin/customapache
./build clean
./build all
4) Fix the modules link:
cd /etc/httpd
rm -f modules
ln -s /usr/lib/apache modules
5) Restore the old boot script:
cp -f /usr/local/directadmin/customapache/httpd /etc/init.d/httpd
chmod 755 /etc/init.d/httpd
/etc/init.d/httpd restart
Source : http://directadmin.com/
Control mounting a file system
You can have more control on mounting a file system like /home and /tmp partitions with some nifty options like noexec, nodev, and nosuid. This can be setup in the /etc/fstab text file. The fstab file contains descriptive information about the various file systems mount options; each line addresses one file system.
Details regarding to security options in the fstab text are:
defaults: Allow everything quota, read-write, and suid on this partition.
noquota: Do not set users quotas on this partition.
nosuid: Do not set SUID/SGID access on this partition.
nodev: Do not set character or special devices access on this partition.
noexec: Do not set execution of any binaries on this partition.
quota: Allow users quotas on this partition.
ro: Allow read-only on this partition.
rw: Allow read-write on this partition.
suid: Allow SUID/SGID access on this partition.
More information can be found in the mount(8) man pages