Want to subscribe to topics you're interested in?
Become a Member

SSL Accidentally deleted .CSR contents

Discussion in 'Domains, DNS, Email & SSL Certificates' started by Rdurty2, Nov 13, 2015.

  1. Rdurty2

    Rdurty2 Member

    38
    9
    8
    Oct 31, 2015
    Ratings:
    +12
    Local Time:
    10:49 PM
    1.11.4
    10.0.27
    I accidentally deleted and saved, ugh, the contents of SSL CSR File: /usr/local/nginx/conf/ssl/mydomain/mydomain.com.csr


    This was initially auto created when I created my vhost using centmin mod menu. How can I recreate it without losing anything? Also will I need new private key?

    Once I move my domain over to my new VPS I plan on setting up https/ssl on it.
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Have you since initial install, upgraded Nginx at any time ? If you have, each time you upgrade Nginx an auto backup of nginx conf files and ssl directories is generated. See http://centminmod.com/nginx.html#autobackup and http://centminmod.com/configfiles.html
    So you maybe able to find a backup for your ssl/mydomain/mydomain.com.csr at /usr/local/nginxbackup and subdirectories.

    Otherwise, yes you need to regenerate a new csr file and private key pair. The instructions for such can also be found in vhost generator at http://centminmod.com/vhost.php just enter domain name and select self-signed ssl yes and you should see initial openssl command instructions for recreating them

    example for domain.com
     
    Last edited: Nov 13, 2015
  3. Rdurty2

    Rdurty2 Member

    38
    9
    8
    Oct 31, 2015
    Ratings:
    +12
    Local Time:
    10:49 PM
    1.11.4
    10.0.27
    Thanks for the quick response. I have not upgraded Nginx since install. Install was only done 11 days ago.

    I will follow your second suggestion.
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah you should be able to regenerate them easily. If you already paid for and obtained ssl certificate using old csr file, you will also need to reissue your ssl certificate using new csr file.