Just a small collection of recipes for repetitive tasks after provisioning a server/app under Laravel Forge.
To use any of these, it is recommended to use the contents of the shell script as opposed to the curl snippets.
Copy the code and paste under New Recipe
in Forge.
Will disable and stop services installed by Forge on provisioning but leave nginx alone. Useful if your app already connects to external resources like AWS.
Executes: system-stop-and-disable-services-on-boot.sh
curl -sS "https://raw.githubusercontent.com/mojopollo/laravel-forge-recipes/master/system-stop-and-disable-services-on-boot.sh" | sh
Will create a conf file /etc/nginx/conf.d/cloudflare-set-real-ip.conf
with cloudflare's ip addresses and use the CF-Connecting-IP
header to set the real ip address then restarts nginx.
If cloudflare updates their ip address, all that needs to be done is run this command again to update ip addresses.
Executes: nginx-set-real-visitor-ip-from-cloudflare-enable.php
curl -sS "https://raw.githubusercontent.com/mojopollo/laravel-forge-recipes/master/nginx-set-real-visitor-ip-from-cloudflare-enable.php" | php
Removes /etc/nginx/conf.d/cloudflare-set-real-ip.conf
and restarts nginx
Executes: nginx-set-real-visitor-ip-from-cloudflare-disable.sh
curl -sS "https://raw.githubusercontent.com/mojopollo/laravel-forge-recipes/master/nginx-set-real-visitor-ip-from-cloudflare-disable.sh" | sh
Will install packages mostly used by php apps and with some other custom packages
Executes: system-install-php-essentials.sh
curl -sS "https://raw.githubusercontent.com/mojopollo/laravel-forge-recipes/master/system-install-php-essentials.sh" | sh