Automatically install Let's Encrypt certificates for VestaCP

Automatically install Let's Encrypt certificates for VestaCP

VestaCP, a very good host panel, graphical. The free SSL certificates provided by Let's Encrypt are great. This script can automatically install SSL certificates for VestaCP.

VestaCP Introduction: VestaCP: Russia's Free, Graphical VPS Panel
Let's encrypt: [Free SSL] Quickly obtain/renew Let's encrypt certificates

Here is the script description:
sudo letsencrypt-vesta [-m email] [-u] user1 [domainlist1] […-u userN [domainlistN]]

-m: Email address, used to register with Let's Encrypt
-u: VestaCP user. By default, SSL certificates for all domain names under this user are generated. If you only need a single site, you can use it separately.

Script installation :
1. Download the script

 cd /usr/local git clone https://github.com/letsencrypt/letsencrypt.git git clone https://github.com/interbrite/letsencrypt-vesta.git

2. Create a folder to store certificates

 mkdir -p /etc/letsencrypt/webroot

3. Choose whether to use Apache or Nginx for your website. If VestaCP is installed with the default configuration, it is recommended to use Apache.
Apache website settings :

 ln -s /usr/local/letsencrypt-vesta/letsencrypt.conf /etc/httpd/conf.d/letsencrypt.conf service httpd restart

or

 ln -s /usr/local/letsencrypt-vesta/letsencrypt.conf /etc/apache2/conf.d/letsencrypt.conf service apache2 restart

Nginx website settings <br />Add code to the nginx configuration file, generally located in /usr/local/vesta/data/templates/web/nginx and /usr/local/vesta/data/templates/web/nginx/php5-fpm. Add at location.

 location /.well-known/acme-challenge { default_type text/plain; root /etc/letsencrypt/webroot; }

Allow all users to use SSL connections (replace USERNAME with your username):

 /usr/local/vesta/bin/v-rebuild-web-domains USERNAME

Restart:

 service nginx restart

4. Create a link to /usr/local/bin/

 ln -s /usr/local/letsencrypt/letsencrypt-auto /usr/local/bin/letsencrypt-auto ln -s /usr/local/letsencrypt-vesta/letsencrypt-vesta /usr/local/bin/letsencrypt-vesta

5. Create a certificate

 letsencrypt-vesta USERNAME DOMAIN

6. Update letsencrypt-vesta

 cd /usr/local/letsencrypt-vesta git pull origin master

via: https://github.com/interbrite/letsencrypt-vesta

<<:  Hostdare: $20/month/E3-1240v2/16GB memory/1TB hard disk/10TB traffic/5 IP/USA

>>:  Netfirms .com domain name discount: $1.39/first year

Recommend

$1/month/10G space/100G traffic/virtual host: Hostient

Hostient is an American hosting company establish...

ZeptoVM: $42/year/512MB memory/10GB space/320GB traffic/1Gbps/KVM/Bakhtar

ZeptoVM, a US hosting provider, Wyoming company (...

MangoXChange: $20/year/20GB storage/100GB data transfer

MangoXChange is an American hosting company that ...

The ten most popular search engines abroad

1. Google There is no doubt that Google is the mo...

$10/year/50G space/500G traffic/virtual host: STEFAL

STEFAL is an American host established in 2010, p...

Smart Router

Smart routers are very popular recently, and the ...

ManSora: $10/month/8GB RAM/600GB storage/unlimited traffic/KVM/Germany/Portland

ManSora, a Chinese merchant, has been introduced ...