Welcome to Centmin Mod Community
Register Now

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:
    9:34 AM
    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

    29,763
    6,721
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,035
    Local Time:
    11:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 1
  3. Rdurty2

    Rdurty2 Member

    38
    9
    8
    Oct 31, 2015
    Ratings:
    +12
    Local Time:
    9:34 AM
    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

    29,763
    6,721
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,035
    Local Time:
    11:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    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.