Blog

Add a new blog
June 21

Configure Apache to Support SSL

Creating the SSL Certificate sudo a2enmod ssl sudo service apache2 restart Generate a Self-signed Certificate sudo openssl genrsa -out ca.key 2048 sudo openssl req -nodes -new -key ca.key -out ca.csr Lastly, generate a self-signed certificate (ca.crt) of X509 type valid for 365 keys. sudo openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt Create a directory to place the certificate files we have created. sudo mkdir /etc/apache2/ssl sudo...

September 11

Linux Find the oldest file in the directory

find the oldest file in the directory find  .  -type f -printf '%T+ %pn' | sort | head -n 1 ...

August 26

How to recursively delete all files of a specific extension in the current directory

Run following command first to see exactly which files you will remove.  find . -name "*.bak" -type f Also, make sure that -delete is the last argument in your command. If you put it before the -name *.bak argument, it will delete everything.  But use it with precaution.  find . -name "*.bak" -type f -delete ...

March 28

Certbot SSL Certification Auto Renew Cron Job

Let's encrypt SSL certificates will get expired after 90 Days of installation and you must renew it before it get expired. Certbot Renew Command $ sudo certbot renew --dry-run Certbot Auto Renew Cron Job $ cat /etc/cron.d/certbot Content: # /etc/cron.d/certbot: crontab entries for the certbot package # # Upstream recommends attempting renewal twice a day # # Eventually, this will be an opportunity to validate certificates # haven't been revoked, etc....

February 26

Upgrade Ubuntu 16.04 to Ubuntu 18.04 LTS

Note: you should stop apache before upgrade. You should back up your conf files, such as apache2.conf, php.ini, my.ini, and all VirtualHost settings. Run simple command to upgrade.  sudo do-release-upgrade After server restarted, login and STOP apache2 to prevent PHP short end breaks php rendering. Enable new php short hand tag in php.ini if it is needed for your code. sudo apt-get remove php7.2-common sudo apt...

February 26

How to Upgrade Ubuntu 14 to 16

check current version: lsb_release -a Install Available Updates apt-get update apt-get upgrade apt-get dist-upgrade Stop Services service apache2 stop START UPGRADE 1. Install the update-manager-core package: apt-get install update-manager-core 2. Open /etc/update-manager/release-upgrades and verify that the Prompt value is set to lts: Prompt=lts 3. You’re now ready to begin the upgrade to Ubuntu 16.04 LTS: do-release-upgrade Follow the on-screen instructions to complete the installation process. Install and Update php7.0 properly after upgrade. note: you might want...

May 28

Tips for linux/ubuntu 'du' for hidden files

du -sch .[!.]* * |sort -h ...

May 13

Use /etc/hosts to direct wildcard domain name

You need to set up a DNS server. (install dnsmasq (is light) or bind (is rather heavy)). To install... Ubuntu OS: sudo apt-get install dnsmasq In /etc/NetworkManager/dnsmasq.d/dnsmasq-localhost.conf and address=/localhost.com/127.0.0.1 restart sudo /etc/init.d/dnsmasq restart with Mac OS: Install dnsmasq brew update # Always update Homebrew and the formulae first brew install dnsmasq sudo brew services start dnsmasq sudo brew services start dnsmasq Configure dnsmasq Its default configuration file is located at /usr/local/etc/dnsmasq.conf and contains examples of...

October 24

How to Manage File and Folder Permissions in Linux

Command line: File permissions The commands for modifying file permissions and ownership are: chmod – change permissions chown – change ownership. chmod – the command to modify permissions R – this modifies the permission of the parent folder and the child objects within ugo+rw – this gives User, Group, and Other read and write access. The breakdown of permissions looks like this: u – user g – group o –...

Send us a message. We will reply as soon as we can.