Want to subscribe to topics you're interested in?
Become a Member

Letsencrypt Is it possible to install letsencrypt without creating a new vhost?

Discussion in 'Domains, DNS, Email & SSL Certificates' started by CarpCharacin, Nov 25, 2016.

  1. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    Is it?

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Not really as letsencrypt requires domain validation and that requires verifying domain name DNS wise goes to the server IP and that you own the domain. The verification is done via webroot authentication which means for Centmin Mod, letsencrypt client i.e. addons/acemtool.sh underlying acme.sh client will auto create a verification file in domain.com's web root at /home/nginx/domains/domain.com/public and then letsencrypt servers access domain.com/path/to/verification/file to confirm your domain. So you do need create a new vhost via centmin.sh menu option 2 if you enable addons/acmetool.sh in 123.09beta01. There's also manual methods if you don't want to use centmin.sh menu option 2 via addons/acmetool.sh. But it still involves creating nginx vhost as webroot authentication is need for letsencrypt to verify your domain.

    manual methods
     
  3. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    But what makes it impossible to enable acmetool.sh in an existing vhost?
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Oh i thought you meant get letsencrypt ssl cert without creating an existing domain nginx vhost site. If you already have existing nginx vhost site, you can directly use addon/acmetool.sh for automated letsencrypt on new or existing domain but it's beta and needs testing and feedback. Or you can do it manually via manual methods

    manual methods
    which work on existing nginx vhost domains
     
  5. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    I have a vhost for utahfishkeepers.us and it is running and I want to add letsencrypt to it without creating a new vhost.
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    then manual methods outlined above are what you need to do if you don't want to beta test addons/acmetool.sh directly
     
  7. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    But would beta testing the tool be safe, or would it crash my site and burn it to the ground?
     
  8. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    Also, do the certificates need maintaining?
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    beta testing may mess up your nginx vhost files in certain combination or choices i.e. if you do test ssl cert then re-run for live ssl cert so yes may cause site downtime.

    The manual methods won't cause any such as you manually make the changes to the nginx vhost files as instructed

    no if you follow manual methods they ssl certs get auto renewed via underlying acme.sh cronjob
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  11. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    But will they get auto renewed if I test the tool?
     
  12. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
  13. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no read the auto generated instructions ;)

    creating the vhost and vhost file are 2 separate things

    creating vhost means directory structures at /home/nginx/domains/domain.com/* etc

    while creating vhost file structure is needed for letsencrypt and is what the vhost generator does
     
  14. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    I entered the domain name, but it wouldn't take it. It just said required field, but I filled it out.
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    works for me for utahfishkeepers.us - no http just domain name itself
     
  16. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    upload_2016-11-25_13-8-36.png
    upload_2016-11-25_13-10-1.png
     
  17. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    Ok I think I just didn't see it. So I just run this command?
    Code:
    mkdir -p /usr/local/nginx/conf/ssl/utahfishkeepers.us
    cd /usr/local/nginx/conf/ssl/utahfishkeepers.us
    openssl dhparam -out dhparam.pem 2048
     
  18. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no follow all generated steps that is just the first part (first 3 cmds)

    backup existing domain.us.conf file just in case
     
  19. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    4:44 AM
    1.15.x
    MariaDB 10.1
    So I just run the first 3 listed commands and I am good to go? Do I have to install the tool?
     
  20. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no no.. you need to follow all steps listed on entire generated page down to the new domain.com.ssl.conf and replacing the 3 ssl cert file paths.

    everything on generated page needs to be done including the other commands