Categories
Servers

Moving Site Off Nginx

When you move a website and change its DNS A record you will need to delete it from the old Nginx server. Otherwise when Nginx reboots (e.g. after a certificate renewal) it will fail DNS resolution.

I believe this can be changed, but by default Nginx will break when the DNS connection (even of an unrelated site) changes.

Categories
Laravel

Laravel 5.5 Carbon Wrapper

Categories
Workflow

Mac Homebrew Dev Environment Stuff

Restart Apache
sudo apachectl restart

Apache Config
/usr/local/etc/apache2/2.4

Categories
Servers

.htaccess force SSL

[code]RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L][/code]

From inMotion Hosting

Categories
Workflow

KEYBOARD LAYOUT

Left Alt + Shift to revert to correct keyboard layout.

I never remember this.

Categories
Uncategorized

Shopify

https://twitter.com/noncototient/status/905629388758073344

Timber — opinionated, good for getting started

Dhopify — blank slate, more control & more advanced

Categories
Laravel

Laravel New command not finding Composer

When calling ‘laravel new myapp’ this error is given:

sh: composer: command not found

Composer is aliased in ~/.bash_profile, which apparently doesn’t help the laravel installer find it (despite being in $PATH).

The solution was to copy /Users/me/composer.phar to /usr/local/bin/composer
The Laravel installer could then use Composer to setup the application.

Categories
Uncategorized

Mac OS X / Homebrew Notes

which apachectl
/usr/local/bin/apachectl

I expect that response if the Homebrew version of Apache is running.

Categories
PHP Servers

Restart PHP7.3 FPM

Restarting PHP FPM on Ubuntu 16.04

Probably
service php7.3-fpm restart

Maybe
systemctl restart php-fpm.service

Homebrew Locally

sudo brew services restart php74

Categories
Servers

MariaDB Password Change Not Working

New Ubuntu 16 server with MariaDB.

Tried using

“`SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘myGreatPassword’);

Password is changed but could not connect to DB from PHP.

Needed to update mysql.user table and set the Plugin field to an empty value (rather than unix_socket)!