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

PeakServers:$12/year/1 CPU/1G/25G/2T/1 IP/OpenVZ

I have introduced it many times. Now it seems tha...

HostUS: $15/year/1 CPU/768MB memory/20GB space/2000GB/1 IP/OpenVZ

Previously introduced: HostUS: $15/year/2 CPU/512...

Websound: $15/year/256MB memory/15GB space/1TB bandwidth/KVM/Psychz Los Angeles

Websound: A UK hosting company, registered as a f...

3ix.org - $1 hosting

3ix.org started providing hosting services in 200...

TOTYUN 2 cores 2GB memory 20Mbps port unlimited traffic Hong Kong KVM VPS review

Details : TOTYUN: $8/month/1GB RAM/30GB SSD space...

PioHost: £10/year/512MB RAM/10GB storage/500GB bandwidth/KVM/UK

PioHost is a UK registered hosting company (Compa...