Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch ensure Nginx vhost domain's ssl directory is removed

Discussion in 'Centmin Mod Github Commits' started by eva2000, Aug 25, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    35,556
    7,840
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,083
    Local Time:
    2:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  2. quicksalad

    quicksalad Member

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    9:42 AM
    does this mean I need to remove crt, key, csr files in directory /usr/local/nginx/conf/ssl?
     
  3. eva2000

    eva2000 Administrator Staff Member

    35,556
    7,840
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,083
    Local Time:
    2:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    no no.. when you create a new vhost via centmin.sh menu option 2 or /usr/bin/nv at end of the generated vhost there's a message giving you the commands needed to remove the nginx vhost generated. The command note was missing the command to remove /usr/local/nginx/conf/ssl

    example at end of nginx vhost creation you now see messages below

    the incorrect one
    Code:
    -------------------------------------------------------------
    Commands to remove newdomain5.com
    
    rm -rf /usr/local/nginx/conf/conf.d/newdomain5.com.conf
    rm -rf /usr/local/nginx/conf/conf.d/newdomain5.com.ssl.conf
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com/newdomain5.com.crt
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com/newdomain5.com.key
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com/newdomain5.com.csr
    rm -rf /home/nginx/domains/newdomain5.com
    service nginx restart
    -------------------------------------------------------------
    and the corrected one via this commit which added the removal of /usr/local/nginx/conf/ssl/newdomain5.com
    Code:
    -------------------------------------------------------------
    Commands to remove newdomain5.com
    
    rm -rf /usr/local/nginx/conf/conf.d/newdomain5.com.conf
    rm -rf /usr/local/nginx/conf/conf.d/newdomain5.com.ssl.conf
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com/newdomain5.com.crt
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com/newdomain5.com.key
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com/newdomain5.com.csr
    rm -rf /usr/local/nginx/conf/ssl/newdomain5.com
    rm -rf /home/nginx/domains/newdomain5.com
    service nginx restart
    -------------------------------------------------------------
     
    • Informative Informative x 1
  4. quicksalad

    quicksalad Member

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    9:42 AM
    Thanks for clearing @eva2000

    Is it okay to delete my .crt .csr .key file at /usr/local/nginx/conf/ssl? I have only one domain. Please advise.
     
  5. eva2000

    eva2000 Administrator Staff Member

    35,556
    7,840
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,083
    Local Time:
    2:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    if you don't use HTTPS or SSL certificate for your domain, then yes you can delete them but the directory would be /usr/local/nginx/conf/ssl/yourdomain.com/ where they would be.
     
    • Informative Informative x 1
..