Join the community today
Register Now

Beta Branch fix dual cert mode ssl_trusted_certificate concat

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 24, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    8:55 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x fix dual cert mode ssl_trusted_certificate concat

    When testing dual RSA 2048 + ECDSA 256 bit SSL certificate letsencrypt mode when LETSENCRYPT_DETECT='y' + DUALCERTS='y' is set in persistent config file /etc/centminmod/, the concatenated ssl_trusted_certificate file for live letsencrypt SSL certificates is missing causing the ECDSA 256bit SSL certificate to not register and nginx to fail startup config testing. This update fixes the missing concatenated ssl_trusted_certificate file by concatenating both RSA 2048bit + ECDSA 256bit SSL ssl_trusted_certificate files.

    Continue reading...

    123.09beta01 branch
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    8:55 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    For dual RSA + ECDSA SSL certificate mode support SSL - Nginx 1.11.0 introduces dual ECDSA + RSA SSL certificate support !

    With Centmin Mod 123.09beta01 when you have set in persistent config file /etc/centminmod/ LETSENCRYPT_DETECT='y' + DUALCERTS='y', you can use menu option 2, 22 or nv command method to auto generate Nginx HTTP/2 HTTPS vhost with dual RSA + ECDSA Letsencrypt SSL certificates which default to HTTPS with HTTP to HTTPS redirect

    nv command usage
    Code (Text):
    Usage: /bin/nv [-d] [-s y|n|yd|le|led|lelive|lelived] [-u ftpusername]
      -d or
      -s  ssl self-signed create = y or n or https only vhost = yd
      -s  le - letsencrypt test cert or led test cert with https default
      -s  lelive - letsencrypt live cert or lelived live cert with https default
      -u  your FTP username
      /bin/nv -d -s y -u ftpusername
      /bin/nv -d -s n -u ftpusername
      /bin/nv -d -s yd -u ftpusername
      /bin/nv -d -s le -u ftpusername
      /bin/nv -d -s led -u ftpusername
      /bin/nv -d -s lelive -u ftpusername
      /bin/nv -d -s lelived -u ftpusername

    run nv command with lelived flag for live Letsencrypt SSL certificates defaulting to HTTPS site only to generate HTTP/2 HTTPS nginx vhost site and random pure-ftp virtual ftp username generated via pwgen
    Code (Text):
    nv -d -s lelived -u "$(pwgen -1cnys 31)"

    Contents of Centmin Mod HTTP/2 HTTPS Nginx vhost utilising both RSA 2048 bit + ECDSA 256bit Letsencrypt SSL certificates at /usr/local/nginx/conf/conf.d/
    Code (Text):
     server {
       return 302$request_uri;
       include /usr/local/nginx/conf/staticfiles.conf;
    #       listen   80;
    #       server_name;
    #       return 302 https://$server_name$request_uri;
    server {
      listen 443 ssl http2;
      include /usr/local/nginx/conf/ssl/;
      include /usr/local/nginx/conf/ssl_include.conf;
      # cloudflare authenticated origin pull cert
      #ssl_client_certificate /usr/local/nginx/conf/ssl/cloudflare/;
      #ssl_verify_client on;
      http2_max_field_size 16k;
      http2_max_header_size 32k;
      # mozilla recommended
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
      # before enabling HSTS line below read
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
      #add_header Referrer-Policy "strict-origin-when-cross-origin";
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
      # enable ocsp stapling
      resolver valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
      # limit_conn limit_per_ip 16;
      # ssi  on;
      access_log /home/nginx/domains/ combined buffer=256k flush=5m;
      error_log /home/nginx/domains/;
      include /usr/local/nginx/conf/autoprotect/;
      root /home/nginx/domains/;
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site
      #include /usr/local/nginx/conf/cloudflare.conf;
      include /usr/local/nginx/conf/503include-main.conf;
      location / {
      include /usr/local/nginx/conf/503include-only.conf;
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
      # Enables directory listings when index file not found
      #autoindex  on;
      # Shows file listing times as local time
      #autoindex_localtime on;
      # Wordpress Permalinks example
      #try_files $uri $uri/ /index.php?q=$uri&$args;
      include /usr/local/nginx/conf/;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;

    contents of include file /usr/local/nginx/conf/ssl/ containing both RSA 2048 bit + ECDSA 256bit Letsencrypt SSL certificates for dual SSL certificate mode
    Code (Text):
      ssl_dhparam /usr/local/nginx/conf/ssl/;
      ssl_certificate      /usr/local/nginx/conf/ssl/;
      ssl_certificate_key  /usr/local/nginx/conf/ssl/;
      ssl_certificate      /usr/local/nginx/conf/ssl/;
      ssl_certificate_key  /usr/local/nginx/conf/ssl/;
      #ssl_trusted_certificate /usr/local/nginx/conf/ssl/;
      #ssl_trusted_certificate /usr/local/nginx/conf/ssl/;
      ssl_trusted_certificate /usr/local/nginx/conf/ssl/;