SSL on web control panel

webthingz

New member
Joined
Feb 4, 2023
Messages
3
Hello All,

I'm new to directadmin and just installed a directadmin on a vps. Now I allready have a wildcard certificate voor my domain.
I cant get the certificate working on the controlpanel. I was looking in to the installation manual but could not find a clear explanation.

So i created a default domain example.com and my servername is sub.example.com.
1. Do i need to create a default domain with my servers hostname sub.example.com?
2. Do i need to create a default domain with my domain example.com.
3. Do i need to add a subdomain for my hostname? (Where can I find the basic setup in the manual?)

I did both and copy pasted the key and certificate in 'Paste a pre-generated certificate and key' that was also ok and accepted but still no secure https connection.
Is there another place where I need to put the certificate? Going crazy about something that should be not so hard to do.

If someone could please tell me or point me to a place in the docs...

Thanks!

Ziggy
 
Hi all,
we've run into this issue and have tried all there was to find but still when we access DA on 2222 the server supplies the cert from on of the websites running on the server.

/usr/local/directadmin/conf contains both cacert.pem and cakey.pem (working on an array of other servers)

I have no idea where to look.

Anyone any ideas?
 
Hello,

Will you provide your server name please. You can do it either here or privately. I won't say it can be fixed by this way, at least I could check how it looks from my side.

Anyone any ideas?
 
OK, I see. Remove the following files (it is OK if any is missing):
  • /usr/local/directadmin/conf/ca.csr
  • /usr/local/directadmin/conf/ca.san_config
  • /usr/local/directadmin/conf/cacert.pem
  • /usr/local/directadmin/conf/cacert.pem.combined
  • /usr/local/directadmin/conf/cacert.pem.creation_time
  • /usr/local/directadmin/conf/cakey.pem
  • /usr/local/directadmin/conf/carootcert.pem
  • /usr/local/directadmin/conf/letsencrypt.key
  • /usr/local/directadmin/conf/letsencrypt.key.json
and re-generate the certificate

Bash:
/usr/local/directadmin/scripts/letsencrypt.sh request $(hostname -f) 4096

And see whether it solves the issue.
 
Hi zEitEr,
thanks for you help. I forgot to mention, the cert files cacert.pem and cakey.pem are generated from a bought wildcard cert. These exact pem's are in use at 40+ other servers and working fine there. Just to eliminate an issue with the pem's themselves.

So i could decide to switch to letsencrypt for this one but just to make sure; is that the right way now knowing above?
 
I guess you've already restart DirectAdmin? And maybe run:

Bash:
killall -9 directadmin
systemctl restart directadmin

And it did not help?

Then you checked

Bash:
da c | grep -E "^(cacert|cakey|carootcert)="

and you have the following output:

Code:
cacert=/usr/local/directadmin/conf/cacert.pem
cakey=/usr/local/directadmin/conf/cakey.pem
carootcert=/usr/local/directadmin/conf/carootcert.pem

Correct?
 
Thanks again!
I did not do the restart combined with killall - so i did now. No avail unfortunately. The 'grep' matched the output you suggest but the third file is not actually on the server, on this path. I do not have that file on any other server either, so weird. Should i get it? And where does it come from?
 
Should i get it? And where does it come from?

In case of a paid certificate the file should be downloaded from a server of your certificate issuer. It is intermediate certificate.

No avail unfortunately

I see a valid certificate on port :2222 from my end. It seems to be working fine now. Is that still different from your location?
 
Yep, just checked it. I suspect the killall did the trick (multiple instances of DA running than??). I have experienced before that sometimes it takes a few minutes for changes to take effect.
Thank you very much!
 
Back
Top