Laravel Community Tools by Tighten

All Recipes

140 recipes available

Disable Xdebug

Disables Xdebug for production servers. Based on fideloper https://laracasts.com/discuss/channels/forge/disable-xdebug/replies/3310

sudo php5dismod xdebug
sudo service php5-fpm restart
10 years ago
steveneaston

Install a locale to your server

When needed, an easy recipe to add locale to the machine.

# You should change fr_CA for the locale you want.
echo ">> Installing fr_CA locale"
sudo locale-gen fr_CA
sudo locale-gen fr_CA.UTF-8
10 years ago
jpmurray

Enable 1GB swap (fast & will survive a reboot)

Creates a 1G swapfile that will be mounted again each time the instance boots by adding it to /etc/fstab. Based on: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

if [ -f /swapfile ]; then
    echo "Swapfile already exists?"
    exit 1
fi
10 years ago
simensen

Secure your server with CSF

This recipe installs CSF - ConfigServer Security & Firewall ( see http://configserver.com/cp/csf.html ). CSF adds firewall and numerous security settings to your server, and is recommended to insta...

# Your IP.
# NOTE! CHANGE THIS VARIABLE TO THE IP OF THE SERVER ADMIN
ADMIN_IP="111.111.111.111"

10 years ago
stingray454

Fix app/storage permissions

Because 777 permissions are wrong, this sets a forge provisioned site's storage directory to the correct permissions. Run this as a root user after updating line 2.

# Update this to the 
cd /home/forge/mysite/
php artisan cache:clear
cd app
10 years ago
baf

install automysqlbackup

After much pain trying to figure out how to make the process of rsyncing backups created by automysqlbackup, I came up with this working recipe that requires no manual configuration at all The s...

# Install automysqlbackup
apt-get -y --force-yes install automysqlbackup

# Create post backup script
10 years ago
vesper8

Fix NGINX 413 Request Entity Too Large (cannot upload larger files)

If you cannot upload larger files via your website, it might be because your Nginx config is missing client_max_body_size. This recipe will go through your all websites on the server and add a l...

FILES=/etc/nginx/sites-available/*
restart=0

for f in $FILES
10 years ago
picoprime

Install Elasticsearch 1.5

https://gist.github.com/nicgutierrez/e648de313a53eada658d

echo ">> Update Aptitude"
apt-get update
 
echo ">> Install Java"
10 years ago
nic

change php.ini settings easily and reload php

#!/usr/bin/env bash

declare -A replacers

10 years ago
vesper8

Nginx expire rules for static content

rm -rf /etc/nginx/expires.conf

cat >/etc/nginx/expires.conf <<EOF
# Expire rules for static content
10 years ago
Jaspur

ClamAV

ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.

# install ClamAV
sudo apt-get -y --force-yes install clamav clamav-daemon

# Configure
10 years ago
Jaspur

Create a 1G Swap File (Good for 512k Memory instances)

More times than not if you create a 512kb instance some times during more complex composer instances you will run out of memory. This creates a 1G Swap file on your instance giving a fair bit of br...

echo ">> creating Swap Image file"
touch /var/swap.img
chmod 600 /var/swap.img

10 years ago
masterbee