Want more timely Centmin Mod News Updates?
Become a Member

Letsencrypt Created vhost via acme-menu - Redirect Issue

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jimmy, Dec 24, 2020.

  1. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    2:39 AM
    1.17.x
    MariaDB 10.3.x
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. latest
    Running just basic html sites on this server. The connection for the site is secure, but the page is all re-directs. This is the second time I tried this domain and did another one before and had the same problem. Other sites on the server which were created the same way earlier, are fine. Single / same IP.

    I created the vhost via the acme-menu #4 and then #4.


    Any information you want? I didn't see anything in the logs about the error.
     
  2. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    2:39 AM
    1.17.x
    MariaDB 10.3.x
    It doesn't look like centmin mod made the .com.conf file, but did make the com.ssl.conf file.

    Edit: Looks like that's the issue, the acme-menu isn't creating the non-ssl config file.
     
    Last edited: Dec 24, 2020
  3. eva2000

    eva2000 Administrator Staff Member

    47,506
    10,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,759
    Local Time:
    5:39 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    acme-menu hasn't been maintained since it was created to be honest. Best to use one of the 3 methods outlined below with addons/acmetool.sh non-mennu command line methods

    There's generally 3 ways of setting up HTTPS SSL certificate for Centmin Mod Nginx HTTP/2 based HTTPS

    Method 1. The traditional way via centmin.sh menu option 2, 22 but ensuring you set LETSENCRYPT_DETECT='y' in persistent config file created at /etc/centminmod/custom_config.inc before you run centmin.sh menu option 2 or 22 for wordpress. You can do that using command below - only need to do this step once and every subsequent run of centmin.sh menu option 2 or 22 will have letsencrypt ssl certificate support enabled
    Code (Text):
    # enable letsencrypt ssl certificate integration https://centminmod.com/acmetool/
    touch /etc/centminmod/custom_config.inc
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    


    Method 2. Using and testing Centmin Mod 123.09beta01's new addons/acmetool.sh addon which is still in beta testing only for integrating Letsencrypt SSL certificates. And has both auto and manual methods.

    Method 3. Fully manual method for free Letsencrypt SSL certificates.
     
  4. eva2000

    eva2000 Administrator Staff Member

    47,506
    10,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,759
    Local Time:
    5:39 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    did you do HTTPS default selection or not as that will only create domain.com.ssl.conf nginx vhost and add a non-https redirect to that file. Only when you choose non-HTTPS default that you get both domain.com.conf and domain.com.ssl.conf

    FYI, easiest method for me is nv command line method and you can see it in action at for non-wordpress sites at Install - Quick Centmin Mod Install + Nginx Vhost Site + MySQL Database Setup

     
  5. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    2:39 AM
    1.17.x
    MariaDB 10.3.x
    I used option #4 and then #4. I'll have to read up, I thought the acme-menu was the right way.