Skip to content

Instantly share code, notes, and snippets.

@benmarsh
benmarsh / gist:873a37bffd06d3150ed10b33e90352ab
Last active May 13, 2023 10:55
Install ImageMagick on Laravel Valet with PHP 7.4
# Upgrade to PHP 7.4
brew update
brew upgrade php
# Update Valet
valet on-latest-version
@benmarsh
benmarsh / gist:980d9e44b37c5a90a1cf0d2ba90bb259
Created January 30, 2020 09:20
Install ImageMagick / Imagick on a Laravel Forge server
# Check if imagick is installed
# Returns blank if not
php -m | grep imagick
# Install
sudo apt-get install php-imagick
# Check again
# Should return 'imagick'
php -m | grep imagick
@benmarsh
benmarsh / nginx_lets_encrypt.md
Last active January 22, 2022 10:46
Nginx + Let's Encrypt on Laravel Forge - redirect all to new domain, but allow Let's Encrypt to issue and renew

Nginx + Let's Encrypt on Laravel Forge

Redirects everything to a new domain, but allows Let's Encrypt to issue and renew certificates.

Using the inbuilt redirect in Laravel Forge appears to prevent Let's Encrypt from verifying the domain.

Example - redirect everything to example.org - edit Nginx config as below:

location / {