Use different path for certificate files for each domain

bsr

New member
Joined
Jun 16, 2017
Messages
2
I have 2 domain under admin user and have 2 separate SSLs for each on.

After "Paste a pre-generated certificate and key" from admin panel I see this message:

Code:
Certificate and Key Saved.

Details

NOTE: You are using the server IP, so your certificate and key have been saved to:
/etc/httpd/conf/ssl.crt/server.crt
/etc/httpd/conf/ssl.key/server.key

Then when want to add second SSL codes for second domains, I see same codes in the text area and it seems that it is using same certificates files for both domains .

I need separate file for each domain like this :

Code:
/etc/httpd/conf/$domain/ssl.crt/server.crt
/etc/httpd/conf/$domain/ssl.key/server.key

Currently I have used a temporary solution, edit certificate file path for second domain manually in these files. But after rewrite thses files, changes will back again.
Code:
nano /usr/local/directadmin/data/users/admin/nginx.conf
nano /usr/local/directadmin/data/users/admin/httpd.conf


Please Help!
 
Hello,

Try and enable SNI support in directadmin

Code:
echo "enable_ssl_sni=1" >> /usr/local/directadmin/conf/directadmin.conf
service directadmin restart

and if it does not help , then you will need to use another user (not admin) to host your domains.
 
Hello,

Try and enable SNI support in directadmin

Code:
echo "enable_ssl_sni=1" >> /usr/local/directadmin/conf/directadmin.conf
service directadmin restart

and if it does not help , then you will need to use another user (not admin) to host your domains.

Yes problem solved!

Certificate files path for all domains changed to:

Code:
	SSLCertificateFile /usr/local/directadmin/data/users/admin/domains/[B]$domain[/B].cert
	SSLCertificateKeyFile /usr/local/directadmin/data/users/admin/domains/[B]$domain[/B].key
	SSLCACertificateFile /usr/local/directadmin/data/users/admin/domains/[B]$domain[/B].cacert

Thanks for help
 
Back
Top