Discover Centmin Mod today
Register Now

vhost installaction ssl fix, cloudflare strict mode

Discussion in 'Install & Upgrades or Pre-Install Questions' started by adamus007p, Jul 3, 2025.

  1. adamus007p

    adamus007p Member

    378
    19
    18
    Feb 8, 2019
    Ratings:
    +38
    Local Time:
    6:00 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: AlmaLinux 9.6
    • Centmin Mod Version Installed: 132.00stable
    • php 8.3

    @eva2000 I have installed few wordpress blog vhosts - option 22
    but the IP was pointed to the other IP, so I belive that SSL was not generated
    SSL/Authenticated Origin Pulls

    is it possible and how to do that I would change IP to the current VPS and re-create all SSLs?


    My options during intallaction were:

    set ssl_self_signed "y"
    set ssl_letsencrypt "y"
    set ssl_option "4"
    set install_theme "n"
    set install_classic "y"
    set install_autoptimize "y"
    set install_lazyload "y"
    set custom_admin_display "y"
    set admin_display_name "admin3211"
    set install_subdir_blog "n"
    set disable_auto_wp "n"
    set disable_wp_login "n"
    set admin_email "admin@domain.com"
    set cache_option "1"
    set generate_ftp_pass "y"


    Now I have error when I want to use SSL strict mode. How to re-create SSL or fix it?




    should i do this only or something else too?

    Code (Text):
    cd /usr/local/src/centminmod/addons
    ./acmetool.sh issue domain.com live


    or
    Code (Text):
    /root/.acme.sh/acme.sh --cron --home /root/.acme.sh --force
    
     
    Last edited: Jul 4, 2025
  2. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:00 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Did you setup Centmin Mod Letsencrypt to use Cloudflare DNS API domain validation method for issuing Letsencrypt SSL certificates on your Centmin Mod Nginx origin server side? Or regular Letsencrypt with LETSENCRYPT_DETECT='y' Letsencrypt Free SSL Certificates Integration For Centmin Mod LEMP Stack

    To see your Letsencrypt SSL certificate status for issuances and local server install you can run addons/acmetool.sh checkdates command
    Code (Text):
    /usr/local/src/centminmod/addons/acmetool.sh checkdates
    

    It will provide you with 2 sections
    1. nginx installed - that is letsencrypt SSL certificates that were issues and installed into Centmin Mod Nginx vhost
    2. acme.sh obtained - that letsencrypt has issued to you which may be installed or may not be installed.
    If you have same domain SSL certificate listed in both sections, it means that SSL certificated is installed and working on your server.

    Do you see the SSL certificate for your intended domain in both sections?
     
  3. adamus007p

    adamus007p Member

    378
    19
    18
    Feb 8, 2019
    Ratings:
    +38
    Local Time:
    6:00 AM
    Yes I do, this is my persistent file

    Code (Text):
    CF_DNSAPI_GLOBAL='y'
    CF_Token="token"
    CF_Account_ID="account"
    NGINX_SSLCACHE_ALLOWOVERRIDE='y'
    NGINX_STAPLE_CACHE_OVERRIDE='y'
    NGINX_STAPLE_CACHE_TTL='86400'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    AUTOHARDTUNE_NGINXBACKLOG='y'
    ZSTD_LOGROTATE_NGINX='y'
    ZSTD_LOGROTATE_PHPFPM='y'
    LETSENCRYPT_DETECT='y'
    DUALCERTS='y'
    SELFSIGNEDSSL_ECDSA='y'
    NGINX_LIBBROTLI='y'
    NGXDYNAMIC_BROTLI='y'
    PHP_PGO_ALWAYS='y'
    PHP_PGO='y'
    PHP_BROTLI='y'
    PHP_LZFOUR='y'
    PHP_LZF='y'
    PHP_ZSTD='y'
    MARCH_TARGETNATIVE='n'
    AUDITD_ENABLE='y'
    PHPINTL='y'
    PHPFINFO='y'
    LIBRESSL_SWITCH='n'
    DMOTD_PHPCHECK='y'
    WPCLI_CE_QUERYSTRING_INCLUDED='y'
    NGINX_ZERODT='y'
    VHOSTCTRL_CLOUDFLAREINC='y'
    PUREFTPD_DISABLED='y'
    EMAIL='mail@domain.com'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    SELFSIGNEDSSL_ECDSA='y'
    PHPFINFO='y'
    PHP_OVERWRITECONF='n'
    PYTHON_INSTALL_ALTERNATIVES='y'
    



    ok I run:
    Code (Text):
    /usr/local/src/centminmod/addons/acmetool.sh checkdates
    

    and in one server I see:

    Code (Text):
    ----------------------------------------------
    nginx installed
    ----------------------------------------------
    
    /usr/local/nginx/conf/ssl/domain1.com/domain1.com-acme.cer
    SHA1 Fingerprint=22Axxxxxxxxxxxxxxxxxx3F8F18F357B
    certificate expires in 78 days on 20 Sep 2025
    
    /usr/local/nginx/conf/ssl/domain1.com/domain1.com-acme-ecc.cer
    SHA1 Fingerprint=6xxxxxxxxxxx335B169E34
    certificate expires in 78 days on 20 Sep 2025
    
    /usr/local/nginx/conf/ssl/domain2.com/domain2.com-acme-ecc.cer
    SHA1 Fingerprint=F0xxxxxxxxxxxxxxxC22B490C
    certificate expires in 78 days on 20 Sep 2025
    
    /usr/local/nginx/conf/ssl/domain2.com/domain2.com-acme.cer
    
    and
    ----------------------------------------------
    acme.sh obtained
    ----------------------------------------------
    
    /root/.acme.sh/domain1.com/domain1.com.cer
    SHA1 Fingerprint=463F2xxxxxxxxxxxxxxxxxxxxxxx64AA
    [ below certifcate transparency link is only valid ~1hr after issuance ]
    https://crt.sh/?sha1=463F2946xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx64AA
    certificate expires in 69 days on 11 Sep 2025
    Letsencrypt validation method: Le_Webroot='dns_cf'
    
    /root/.acme.sh/domain2.com_ecc/domain2.com.cer
    SHA1 Fingerprint=ExxxxxxxxxxxxxxxxxxxxxxxxxxxxC40D9
    [ below certifcate transparency link is only valid ~1hr after issuance ]
    https://crt.sh/?sha1=E3xxxxxxxxxxxxxxxxxxxxxxxxxxxx0D9
    certificate expires in 69 days on 11 Sep 2025
    Letsencrypt validation method: Le_Webroot='dns_cf'
    
    
    


    in VPS2:
    Code (Text):
    /usr/local/src/centminmod/addons/acmetool.sh checkdates
    ----------------------------------------------
    nginx installed
    ----------------------------------------------
    
    ----------------------------------------------
    acme.sh obtained
    ----------------------------------------------
    
    



    I use working API i have checked it but it not working. I have no idea how...

    should it be?
    Code (Text):
    cd /usr/local/src/centminmod/addons
    ./acmetool.sh issue domain1.com lived
    
    cd /usr/local/src/centminmod/addons
    ./acmetool.sh issue domain2.com lived
    
    

    and so on?

    @eva2000 what can I do with the 2nd VPS?
     
    Last edited: Jul 4, 2025
  4. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:00 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    so 2nd VPS is one with the problem?

    First try running your intended SSL certificate domain through the letsdebug.net online testing tool to check for potential errors with HTTP-01 validation. If you created Centmin Mod 123.09beta01 or higher Nginx site with Letsencrypt via centmin.sh menu option 2, 22 or nv command line, you now also have an automatic letsdebug.net API check log saved at /root/centminlogs/letsdebug-yourdomain.com-${DT}.log where yourdomain.com is domain specified during nginx vhost creation and DT is date/timestamp. Inspecting the /root/centminlogs/letsdebug-yourdomain.com-${DT}.log log will also give you clues as to why letsencrypt SSL certificate issuance failed.

    How was the initial letsencrypt ssl certificate obtained ? Which method ?
    • Was the domain nginx vhost alreadying created prior or new domain nginx vhost site setup for first time ?
    • Via centmin.sh menu option 2, 22, /usr/bin/nv ?
    • If you ran centmin.sh menu option 2 or 22, which letsencrypt option did you select from
      Code (Text):
      -------------------------------------------------------------
      Setup full Nginx vhost + Wordpress + WP Plugins
      -------------------------------------------------------------
      
      Enter vhost domain name you want to add (without www. prefix): acme3.domain1.com
      
      Create a self-signed SSL certificate Nginx vhost? [y/n]: n
      Get Letsencrypt SSL certificate Nginx vhost? [y/n]: y
      
      You have 4 options:
      1. issue staging test cert with HTTP + HTTPS
      2. issue staging test cert with HTTPS default
      3. issue live cert with HTTP + HTTPS
      4. issue live cert with HTTPS default
      Enter option number 1-4: 1
      
    • Via addons/acmetool.sh ? which specific command ? examples
      Code (Text):
      ./acmetool.sh issue acme.domain.com
      
      Code (Text):
      ./acmetool.sh issue acme.domain.com live
      
      Code (Text):
      ./acmetool.sh issue acme.domain.com d
      
      Code (Text):
      ./acmetool.sh issue acme.domain.com lived
      
    • What was order of steps you did ? Did you run centmin.sh menu option 2 first with letsencrypt ? Then did you run addons/acmetool.sh afterwards ?

    Centmin Mod Self-Signed SSL Fallback



    If you're seeing a Centmin Mod's self-signed ssl certificate instead of letsencrypt ssl certificate, then that's acmetool.sh and centminmod's fallback if letsencrypt verification fails to obtain letsencrypt ssl cert, it falls back to centmin mod self-signed ssl certificate on https port 443 side so to preserve the https nginx vhost

    Troubleshooting



    There are various steps you can do to troubleshoot failed letsencrypt issuances, renews, reissues etc.
    • acmetool.sh logs all command line or shell menu runs to log files at /root/centminlogs. To troubleshoot, copy the contents of the log run and post contents of log to pastebin.com or gist.github.com and share link in this thread. To find the log list the logs in ascending date order
      Code (Text):
      ls -lahrt /root/centminlogs
      .
    • You can also do a quick grep filter on all previous and current acmetool.sh runs of the underlying acme.sh client for errors listed in errordetails field of each log using the command below:
      Code (Text):
      find /root/centminlogs/ -type f -name 'acme*.log' -printf '%TY-%Tm-%Td %TH:%TM:%TS %p\n' | sort | awk '{print $3}' | xargs -d '\n' grep -i 'errordetail'
      
    • For direct acmetool.sh runs, there should be a 2nd & 3rd & 4th log in format /root/centminlogs/centminmod_${DT}_nginx_addvhost_nv.log and /root/centminlogs/acmetool.sh-debug-log-$DT.log and /root/centminlogs/acmesh-issue_*.log or /root/centminlogs/acmesh-reissue_*.log which would need to be included via separate pastebin.com or gist.github.com post.
    • Enable acmetool.sh debug mode. In persistent config file at /etc/centminmod/custom_config.inc (create it if doesn't exist) add and enable acmetool.sh debug mode which gives much more verbose letsencrypt issuance process information when you re-run acmetool.sh or centmin.sh menu options 2, 22 or /usr/bin/nv command lines.
      Code (Text):
      ACMEDEBUG='y'
    If acme.sh auto renewals didn't happen, check output for the following commands
    Code (Text):
    grep acme /var/log/cron* | sed -e "s|$(hostname -s)|host|g"
    

    Code (Text):
    echo y | /usr/local/src/centminmod/addons/acmetool.sh checkdates
    

    Code (Text):
    "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh"
    

    Code (Text):
    echo | openssl s_client -connect yourdomain.com:443
    

    Without the answers to above questions and logs, there is nothing to help troubleshoot.

    SSLLabs Test



    Also run your HTTPS domain site through SSLLabs tester at SSL Server Test (Powered by Qualys SSL Labs) if it says untrusted SSL cert and prompts to continue the test, continue the test.

    Cloudflare



    If you use Cloudflare, instead of the default Letsencrypt web root validation, you can use Cloudflare's DNS API for Letsencrypt DNS validation for your domain. See the outline at bottom of page at Letsencrypt Free SSL Certificates
     
  5. adamus007p

    adamus007p Member

    378
    19
    18
    Feb 8, 2019
    Ratings:
    +38
    Local Time:
    6:00 AM
    I install a fresh centmonmod and use 22 option to instal the same vhost like in the old VPS, but the IP was poiting to the old VPS.

    My install process was following:

    set ssl_self_signed "y"
    set ssl_letsencrypt "y"
    set ssl_option "4" >> 4. issue live cert with HTTPS default
    set install_theme "n"
    set install_classic "y"
    set install_autoptimize "y"
    set install_lazyload "y"
    set custom_admin_display "y"
    set admin_display_name "admin3211"
    set install_subdir_blog "n"
    set disable_auto_wp "n"
    set disable_wp_login "n"
    set admin_email "admin@domain.com"
    set cache_option "1"
    set generate_ftp_pass "y"



    I run this command:
    ./acmetool.sh issue domain2.com lived and I see certs are recreated.

    is it a proper way/method?


    now i see:
    echo y | /usr/local/src/centminmod/addons/acmetool.sh checkdates
    and then:

    Code (Text):
    nginx installed
    ----------------------------------------------
    
    /usr/local/nginx/conf/ssl/domain1.com/domain1.com-acme.cer
    SHA1 Fingerprint=7C9xxxxxxxxxxxxxxxxxxxxB3D7
    certificate expires in 88 days on 1 Oct 2025
    
    ----------------------------------------------
    acme.sh obtained
    ----------------------------------------------
    
    /root/.acme.sh/domain1.com/domain1.com.cer
    SHA1 Fingerprint=7xxxxxxxxxxxxxxxxxxE19EB3D7
    [ below certifcate transparency link is only valid ~1hr after issuance ]
    https://crt.sh/?sha1=7xxxxxxxxxxxxxxxxxxxx1DE19EB3D7
    certificate expires in 88 days on 1 Oct 2025
    Letsencrypt validation method: Le_Webroot='dns_cf'
    
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:00 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    If that works, then yes :)