DirectAdmin SSL login quirk...


Using the built-in Let's Encrypt, my site seems to be all "hooked up" for SSL, but when attempting to log in into DA via https, ( I get a "This Connection is not private" browser message. HOWEVER... If I try to access via http via ( it redirects to https and I get the normal DA log in page.

Why is the https not working for DA log in?

Did you set this up?
cd /usr/local/directadmin
./directadmin set ssl 1
./directadmin set carootcert /usr/local/directadmin/conf/carootcert.pem
./directadmin set ssl_redirect_host
service directadmin restart

If you didn't set this, then accessing over HTTPS:// will still redirect to the IP.
Hi Jonathan,

I just checked the directadmin.conf file and everything you mention above appears to be set (during install by KH tech).

"./directadmin set ssl_redirect_host" is set to Should this be set to

To clarify: Typing will redirect to Typing will result in a browser "connection not private" warning.

Thanks for helping me try to understand this all! :)
I apologize. When I initially read this thread, I was pretty sure it said '' which is what you were having issues with.

You're receiving this error because DirectAdmin is tied to the hostname certificate for any :2222 connections over https.

This doesn't allow any other domains to access over :2222 other then the secured hostname.

So when you expand the warning to see whats occurring you get:

"This server could not prove that it is; its security certificate is from This may be caused by a misconfiguration or an attacker intercepting your connection."

This is normal and by design.

In order to enable https:// for or -- configuration changes would need to occur to the directadmin.conf file.


Need to disable 'force_hostname='

Need to ensure that 'mail_sni=' is enabled to '1'.

If you haven't had mail sni setup yet:

Then you need to execute this via cli: echo "action=rewrite&value=mail_sni" >> /usr/local/directadmin/data/task.queue

That tells the system to write all eligible SNI domains(that currently have SSL certificates) to their proper files which will allow for the multiple certificates to work for each individual domain for :2222.
Great! -Thanks for the detailed info!

Other than overcoming the log-in "quirk" I encountered, is there an advantage to using mail sni for a non-reseller VPS like myself?
Depends on how many domains you have and how many emails per each domain.

sni (server name identification) is used to allow multiple certificates to exist on 1 shared/primary IP.

mail sni for Directadmin allows these certificates to be used for exim/dovecot so that you can access your email securely over various secured domains on the same IP address.
I don't imagine having more than a half-dozen domains. Sounds like I can probably leave things as-is for now...

Thanks for your help, Jonathan!