DirectAdmin
Updating Apache to the latest version
by admin on Sep.08, 2009, under DirectAdmin
You can check the current version of apache by running
httpd -v
If you wish to update your 1.3 version of apache to the most recent, run the following:
cd /usr/local/directadmin/customapache
./build clean
./build update
./build apache_mod_ssl
If you’re using apache 2.x, use "./build apache_2" instead of apache_mod_ssl.
This should update both the configure options and the version of apache to the most recent version. Once the update has completed, you’ll need to restart apache:
RedHat:
/sbin/service httpd restart
FreeBSD:
/usr/local/etc/rc.d/httpd restart
/usr/include/krb5.h:2606:24: et/com_err.h: No such file or directory
by admin on Sep.08, 2009, under DirectAdmin
If you receive the error
/usr/include/krb5.h:2606:24: et/com_err.h: No such file or directory
When compiling, run the following then try again:
yum install e2fsprogs-devel
or
up2date -u e2fsprogs-devel
How to setup the Mail System
by admin on Sep.08, 2009, under DirectAdmin
One common problem people have is an incorrectly setup mail system. Here is a list of rules that must be followed:
1) hostname must not match any domain that is being used on the system. Example, if you have a domain called domain.com and you want to recieve mail on user@domain.com, you must *not* set your hostname to domain.com. We recommend using server.domain.com instead. You must make sure that you add the A record for server.domain.com so that it resolves.
2) The hostname must be in the /etc/virtual/domains file.
3) The hostname must *not* be in the /etc/virtual/domainowners file.
4) The hostname must resolve. If not, add the required A records to the dns zone such that it does.
5) The directory /etc/virtual/hostname must exist.. (eg: /etc/virtual/server.domain.com). It must not contain any files.
6) Any domains that you want to use for email (eg: domain.com) must be in both the /etc/virtual/domains file and the /etc/virtual/domainowners file. The directory /etc/virtual/domain.com must exist and the files /etc/virtual/domain.com/passwd and /etc/virtual/domain.com/aliases exist.
7) File permissions for virtual pop inboxes should be (not applicable with Dovecot/Maildir):
/var/spool/virtual/domain.com 770 username:mail
/var/spool/virtual/domain.com/* 660 username:mail
If you’ve made any changes to you /etc/exim.conf file and require a fresh copy, you can retrieve one with this guide:
http://help.directadmin.com/item.php?id=51
Ensure your hostname does not contain any upper case letters.
9) Make sure that your main server IP has a reverse lookup on it.
Setting up DA with an SSL certificate
by admin on Sep.08, 2009, under DirectAdmin
You can switch DirectAdmin to use SSL instead of plain text. -> https instead of http on port 2222.
Note that this is for the DirectAdmin connection on port 2222, *not* for apache.
If you’re tryting to setup a certificate for your domain through apache, use this guide.
If you do not have your own certificates, you’ll need to create your own:
/usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9999 -nodes
chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem
This is the old method, use either the one above, or this one. The end result is the same, but takes more steps.
openssl req -new -x509 -keyout /usr/local/directadmin/conf/cakey.pem.tmp -out /usr/local/directadmin/conf/cacert.pem -days 3653
openssl rsa -in /usr/local/directadmin/conf/cakey.pem.tmp -out /usr/local/directadmin/conf/cakey.pem
rm -f /usr/local/directadmin/conf/cakey.pem.tmp
chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem
(Paste these one at a time as the first 2 require user input)
If you already have your own certificate and key, then paste them into the following files:
certificate: /usr/local/directadmin/conf/cacert.pem
key: /usr/local/directadmin/conf/cakey.pem
Edit the /usr/local/directadmin/conf/directadmin.conf and set SSL=1 (default is 0). This tells DA to load the certificate and key and to use an SSL connection. DirectAdmin needs to be restarted after this change.
If you also have a CA Root Certificate, this can be specified by adding:
carootcert=/usr/local/directadmin/conf/carootcert.pem
into the /usr/local/directadmin/conf/directadmin.conf file (won’t exist by default) and by pasting the contents of the caroot cert into that file.
Note, as of 1.30.2, you can set the value of the SSL redirect should a User connect to an https connection with plaintext http.
http://www.directadmin.com/features.php?id=801
As of 1.33.3, you can enable a ssl cipher to force SSLv3, and disable SSLv2:
http://www.directadmin.com/features.php?id=957
checking how to run the C++ preprocessor… /lib/cpp
by admin on Sep.08, 2009, under DirectAdmin
If you encounter this error message, this would imply that you do not have g++ installed:
checking whether we are using the GNU C++ compiler… no
checking whether g++ accepts -g… no
checking dependency style of g++… none
checking how to run the C++ preprocessor… /lib/cpp
*** The make has failed, do you want to try to make again? (y,n):
The gcc-c++ rpm and all it’s dependancies are required to resolve the issue.
Some dependancies inclue:
libstdc++-devel
libstdc++
If you have up2date, simply run:
up2date -u gcc-c++
