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)!

Categories
Servers

LetsEncrypt SSL Failures

SSLs are failing to renew

  • MySquash / UltraVulture due for renewal in <1 month
  • Failing because Nginx is not allowing access to .well-known dir
  • Need to debug syntax and rerun certbot-auto renew

Maybe related to SSL redirection. I think LetsEncrypts requests that file over http

Could HSTS interfere?


Update: One domain was failing due to out of date LetsEncrypt config (pointing to an old install folder).

Got it going by disabling force HTTPS redirect, creating .well-known/acme-challenge and rerunning.

Should be able to delete .well-known and leave it to LetsEncrypt to create those.


Update2:

/etc/letsencrypt/renewal/www.mysquash.pro.conf referred to old install directory (I bump directory when upgrading Laravel).

So .well-known would have been created in wrong path. Pointed to mysquash54, but cannot test yet as now there have been too many recent fails of the domain 🙁

I may have passed through the correct nginx config along the way and not known it.