Automate the creation of nginx sites on Ubuntu

August 26, 2018

This has been adapted from a script by a DigitalOcean mod by the name of Jellingwood. Script has been modified to take PHP into account. This assumes your www directory is /var/www and that you are running PHP 7.0 #!/bin/bash domain=$1 root=”/var/www/$domain” block=”/etc/nginx/sites-available/$domain” # Create the Document Root directory sudo mkdir -p $root # Assign…

Read more

Linux Cheatsheet

May 24, 2018

Last edit: 19 Aug 2018 General #Display OS $ uname -a #Delete GZip files older than 14 days $ find *.gz -mtime +14 -exec rm {} \; #mySQL dump $ mysqldump –opt -uUSERNAME -pPASSWORD -h HOSTNAME DATABASE_NAME FILENAME.sql Nginx /etc/nginx/sites-available #start nginx service nginx start #stop nginx service nginx stop #restart nginx service nginx restart…

Read more


May 13, 2018

Over the many years of owning a domain name, I have gone back and forth, and shifted between different types of sites and purposes. From having a site that acted as a digital business card, to having a blog, to having a portfolio, to having a blog again, to deleting it all and simply redirecting…

Read more