Advanced Search
Search Results
29 total results found
Certbox & NGINX on AWS
Did you know you can use CertBot and NGINX to have a wildcard certificate? Here’s how to do it with an AWS Ubuntu sever. Prerequisites: AWS Route 53 DNS hosted zone Web server using NGINX Website already configured using SSL SSH access with sudo (...
Debug Docker Errors
Seriously have you tried just rebooting your machine? For general container logs you can use the standard docker logs command: docker logs -f --until=120s laravel SSLCertificateFile: file ‘/config_items/certs/impressto.pem’ does not exist or is e...
Certbox & NGINX on AWS
Did you know you can use CertBot and NGINX to have a wildcard certificate? Here’s how to do it with an AWS Ubuntu sever. Prerequisites: AWS Route 53 DNS hosted zone Web server using NGINX Website already configured using SSL SSH access with sudo (ro...
Install and Configure Memcached
Memcached is a lightweight alternative to Redis for storing short lived cache which would otherwise we written to the local storage folder as files. Installing Memcached on Linux is fast and easy. Follow these steps (5 minute job): 1.) As a user with root p...
PHP-FPM Optimization
Out-of-box php fpm is configured for very low server specs such as a 2 core machine. It needs to be configured to match the hardware you are on. You need to factor on the most expensive processes you run. Typically a low-end production server has 4 cores with...
Automatic AWS EC2 Backups
If you have a lot of developers working on the same server, there is nothing worse than having to fix something that went horribly wrong with it. That is why I wrote a script (see at bottom of this page) to help other developers to back up their AWS EC2 instan...
Generally Useful Docker Commands
Remove all Docker Containers Stop the container(s): cd ~/mydocker-repo-folder; docker-compose down; Delete all containers : docker rm -f $(docker ps -a -q) Delete all volumes: docker volume rm $(docker volume ls -q) Delete all networks: docker netwo...
Connect to Remote Servers with VSCode
By far one of the coolest VSCode extensios I’ve used in a whole. This saves me so much time when debugging dev /build machines. I also use Nautilus on Linux to browser remote servers but being able to edit code like it is local saved a heck of a lot of time. ...
Create your own “cloud” storage with Syncthing
I have been using Syncing for years now and had assumed eveyone had at least heard of it. Apparently not. When I do mention it people seem to think is is an impossible thing. It isn’t and it is really easy to setup. What the heck is Syncthing? It is an open ...
Debug PHP with XDebug and VSCode (docker edition)
If you are using Docker you will want to add this to your Dockerfile (runs when container being created). RUN pecl install -f xdebug-2.9.8 \ && rm -rf /tmp/pear \ && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/loca...
SSH Access with Nautilus
If using Linux with Nautilus you can connect directly to the server. 1.) create a config file in .ssh directory. sudo gedit ~/.ssh/config Paste the following and save. You may need to edit the path to your pem files. Host myserver HostName 18.216.138.59 ...
NameCheap SSL Certificates
Namecheap is as the name suggests; a cheap place to get stuff. Their SSL certificates cost 1/5 of what they cost at Godaddy and are pretty much just as good. There are some odd bugs with the namecheap site. Below are the steps you need to successfully create a...
Using Cloudfront For CDN
Basic Setup To setup a CDN using Cloudfront you first need to create an S3 bucket and make it public. In this example we will use pslampdemo.s3.amazonaws.com Note that when setting up a cloudfront distribution you will need to assign an SSL certificate. See:...
Connect to S3 from your local Ubuntu file system
For Mac and Linux you can connect to s3 buckets from your local file navigator using s3fs https://cloud.netapp.com/blog/amazon-s3-as-a-file-system Here are the commands you need for Ubuntu. Replace BUCKETNAME with the name of your S3 bucket. cd ~/; # fo...
Protecting wp-admin from bots
The most common attack on a wordpress site it the login page. Weak or compromised passwords are used by automated bots that will hit thousands of sites a day trying multiple username/password combinations. In this article I will show you how to use .htaccess ...
Skip Password Prompts for Sudo commands
When administrating a development machine or server you may find yourself needlessly entering sudo password. On a production machine this is something you’d want but for a local or develpment machine not so much. Here’s how you can bypass the password: Open ...
Fix Localhost Binding for Safari
Safari does not automatically bind *.localhost domains to 127.0.0.1. To use Safari for local development and especially when using docker with SSL you will need to add the entries to your /etc/hosts file. Here is an example: sudo nano /etc/hosts # add the f...
Create an SSH Key for Git
SSH keys are not just for Git but if you want to use SSH cloning for git, yeah you need em. To create a new SSH key pair do the following: 1.) Open a terminal on Linux or macOS, or Git Bash / WSL on Windows. 2.) Generate a new ED25519 SSH key pair: ssh-key...
Install Mkcert for SSL on Localhost
Mkcertt is a simple tool for making locally-trusted development certificates. It requires no configuration. https://github.com/FiloSottile/mkcert To install on Debian (Ubuntu) use the following commands: sudo apt install libnss3-tools Install LinuxBrew – ...
Apache Tricks
Set Server Agent Name sudo apt-get install libapache2-mod-security2 Once the module is installed, you can modify the Apache config under the file /etc/apache2/apache2.conf. Add this line around the end of the file. <IfModule mod_security2.c> SecServerSigna...