Help with generated SSL certificate

Hi,

I have two droplets at digitalocean, the first is mail in a box (box.mydomain.com) and the second one is my web server (mydomain.com).
I created A record with
curl -X PUT -d "x.x.x.x" https://box.mydomain.com/admin/dns/custom/mydomain.com
so that mydomain.com points to my web server machine.
No problems there, mail server works and I can reach web server at mydomain.com
(System Status Check says - Web has been disabled for this domain because you have set a custom DNS record, I guess it’s ok)

Is it possible to use ssl certificate generated with mail-in-a-box on nginx server on mydomain.com?
I’ve created valid SSL certificates for both box.mydomain.com and mydomain.com when installing mail-in-a-box. (Although now Certificate Status for mydomain.com on TLS (SSL) Certificates says: The domain’s website is hosted elsewhere)

Should I copy ssl keys from box.mydomain.com /home/user-data/ssl to mydomain.com server in order to configure nginx:
server {
listen 443 ssl;
ssl_certificate /etc/ssl/your_domain.crt;
ssl_certificate_key /etc/ssl/your_domain.key;
server_name mydomain.com;

}

Thank you.

Solved the problem by copying certificates from box.mydomain.com machine /home/user-data/ssl to mydomain.com machine /etc/nginx/ssl/

server {
  listen 80;
  listen 443 ssl;
  ssl_certificate        /etc/nginx/ssl/box.mydomain.com.pem;
  ssl_certificate_key    /etc/nginx/ssl/ssl_private_key.pem; 
   ...
}

Will have to automate the process in future for the case when the cert. is renewed.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.