Can dev env use release env's certs?


#1

i have a published web server , served by centos7 apache2.2
i want to change the CA to LE
but i have a question
in my local dev env by virtualbox, can i use the certs that is created by released env ?


#2

I’m not sure I 100% understand your question…

if your published webserver is yourdomain.com and you have a certificate for yourdomain.com, then yes you could place that certificate on your dev environment (virtualbox) and it would work for the domain yourdomain.com (you would need to change your hosts file or something to reach your dev environment by the domain name of course )

If your dev environment uses some otehr domain name ( eg dev.yourdomain.com ) then the certificate for yourdomain.com wouldn’t be valid on dev.yourdomin.com.

Does that answer your question ?


#3

yes, thanks
that is the answer what i needed


#4

FYI, a common approach is to do this:

  1. Set dns for dev.example.com to your production server with a TTL of 60seconds.
  2. Generate a LE certificate for dev.example.com on production.
  3. Update dns for dev.example.com to 127.0.0.1 (or whatever your LAN ip is)
  4. copy the certificate over from production onto dev

That gets you a release environment certificate onto a private lan, without having to deal with any networking.


#5

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