Letsencrypt (Certbot) Generate The Wildcard SSL Certificate

Now with the help of Certbot will generate wildcard certificate for our test domain erpnext.xyz

sudo certbot certonly --manual --preferred-challenges=dns --email nome@erpnext.xyz --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.erpnext.xyz

After executing the above command, the Certbot will share a text record to add to your DNS.


Please deploy a DNS TXT record under the name
_acme-challenge.erpnext.xyz with the following value:

J50GNXkhGmKCfn-0LQJcknVGtPEAQ_U_WajcLXgqWqo

Then you will receive:

Press Enter to Continue
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/erpnext.xyz-0001/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/erpnext.xyz-0001/privkey.pem
  Your cert will expire on 2019-08-31. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

done!

How do up upgrade LetsEncrypt certbot to version 0.22 which supports wildcard certificates?

Check version number

certbot --version || /path/to/certbot-auto --version

If you have already installed Certbot, you should add a parameter to apt-get install to upgrade only a specific package

sudo apt-get update
sudo apt-get install --only-upgrade certbot

Ubuntu 14.04 – PHP Version Upgraded

php -v

Shows:

PHP 5.6.25-2+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologiescode

In the page the php code phpinfo();

phpinfo();

Shows:
PHP Version 5.5.9-1ubuntu4.19

Now to correct this you need to:

sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart

Cheers

Install PHP Composer

1) Update your packages:

sudo apt-get update

2) Install the curl utility:

sudo apt-get install curl

3) Download the installer:

sudo curl -s https://getcomposer.org/installer | php

4) Move the composer.phar file:

sudo mv composer.phar /usr/local/bin/composer

5) Use the composer command to test the installation. If Composer is installed correctly, the server will respond with a long list of help information and commands:

user@localhost:~# composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                /_/
Composer version 1.3.2 2017-01-27 18:23:41

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message

Setting permissions for wordpress

Everyone experiencing this issue should execute these commands:

sudo usermod -aG www-data $USER

Adds the currently logged in user to the www-data group.

sudo chown -R www-data:www-data /var/www

Changes the ownership of the /var/www directory to www-data group.

sudo chmod -R 755 /var/www

If this doesn’t fix the issue you’re having, you’ve got something else wrong and bashing DO is not going to help anyone. If you want a managed server, look for hosting elsewhere. If you need help, ask someone or hire an admin that knows how to not only ‘set things up’ but knows how to secure your server as well. You’ll be glad you did. DO is not for novices, even if they have a lot of tutorials.