Skip to content

Instantly share code, notes, and snippets.

@lnfel
Forked from iamshreeram/php-ssl-install.sh
Created July 4, 2020 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lnfel/72b75081624d3f18cb1c526361caf59a to your computer and use it in GitHub Desktop.
Save lnfel/72b75081624d3f18cb1c526361caf59a to your computer and use it in GitHub Desktop.
Installing SSL certificate in hostinger
# Installation of SSL Certificate
## Enable SSH :
ssh x123011738@31.170.164.22 -p 65002
## Download acme-client
git clone https://github.com/kelunik/acme-client
## Install composer
```
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');";
php composer-setup.php;
php -r "unlink('composer-setup.php');";
php composer.phar install --no-dev
```
## Generating SSL
php bin/acme setup --server letsencrypt --email admin@email.com
php bin/acme issue --domains yourdomain.com:www.youdomain.com --path /home/x123011738/public_html:/home/x123011738/public_html --server letsencrypt
Certificate : `/home/x123011738/acme-client/data/certs/acme-v01.api.letsencrypt.org.directory/yourdomain.com/fullchain.pem`
private key : `/home/x123011738/acme-client/data/certs/acme-v01.api.letsencrypt.org.directory/yourdomain.com/key.pem`
## [Add CRT and privatekey in hostinger]
## Checking expiration date and renewing SSL certificate
php acme-client/bin/acme check --name yourdomain.com --server letsencrypt
## Automatically renew Let’s Encrypt SSL certificate with cron job
php acme/acme-client/bin/acme issue --domains yourdomain.com:www.yourdomain.com --path /home/x123011738/public_html:/home/x123011738/public_html --server letsencrypt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment