Howto: How to get DA works with SSL

jeffery

Verified User
Joined
Jan 13, 2004
Messages
279
I have searched out the forum and finally got my DA worked with SSL.

So, I would like to minimize the work for those who are doing the same thing as me!


Mission : Apache can work with SSL (https) and now we want to get DirectAdmin work with SSL too.
(Connect with https://www.yourdomain.com:2222)

Assumption : Real certificate are purchased from GeoTru*t and other authority and installed to the system.


1. Copy Server Certificate to DirectAdmin Conf Directory.
# cp /etc/httpd/conf/ssl.crt/server.crt /usr/local/directadmin/conf
# cp /etc/httpd/conf/ssl.key/server.key /usr/local/directadmin/conf

2. Chown Certificate
# cd /usr/local/directadmin/conf
# chown diradmin:diradmin server.crt
# chown diradmin:diradmin server.key
# chmod 400 server.crt server.key

3. Edit directadmin.conf
# vi directadmin.conf

Edit :
SSL=0
to
SSL=1

cacert=/usr/local/directadmin/conf/cacert.pem
cakey=/usr/local/directadmin/conf/cakey.pem
to
cacert=/usr/local/directadmin/conf/server.crt
cakey=/usr/local/directadmin/conf/server.key

Save and Exit VI
:wq


4. Restart DirectAdmin
# service directadmin restart


=========================

You should be able to access DA Control Panel by using https://yourdomain.com:2222.

This tutorial is created after my search on the forum, and not *written* by me, I just want to help the other after I have been helped!~

Share the easy! :)
 
Last edited:
er, sorry yah, but apache with https and directadmin with https, ain't they the same?

just the cert u talk here is a purchased cert, am i right :confused:
 
When you made the apache works with SSL, you can access the secured domain with https (https://www.yourdomain.com)

but DirectAdmin may still use the old certificate that you generated in the early stages (self-signed or test certificate), so a pop-up will be out when logging in the DA control panel using https://www.you.com:2222.

You need to tell DA control panel the *purchased* cert in order to get it work exactly with apache does!

You can use these steps to make apache and DA works with the same cert!



:)
 
When i do this, directadmin fails.

It says it has started, but neither http nor https works. When i put in SSL=0 and restart, da will work...
 
Hey,

Double check the paths to the cert/key files in your directadmin.conf file.

If those are wrong you will see the behavior you described.

Also, make sure they are readable by DA.

David
 
Back
Top