Skip to content

Instantly share code, notes, and snippets.

@scrubmx
Created September 7, 2016 17:22
Show Gist options
  • Select an option

  • Save scrubmx/7e689610f793eb7c0f201882a5708cd0 to your computer and use it in GitHub Desktop.

Select an option

Save scrubmx/7e689610f793eb7c0f201882a5708cd0 to your computer and use it in GitHub Desktop.
Laravel Forge Recipes
mysql -p
expect 'Enter password:'
send 'YOUR_MYSQL_PASSWORD'
# Create the development database
CREATE DATABASE IF NOT EXISTS develop
GRANT ALL ON develop.* TO 'forge'@'localhost'
# Create the production database
CREATE DATABASE IF NOT EXISTS production
GRANT ALL ON production.* TO 'forge'@'localhost'
FLUSH PRIVILEGES
exit
apt-get --purge remove postgresql\*
rm -r /etc/postgresql/
rm -r /etc/postgresql-common/
rm -r /var/lib/postgresql/
userdel -r postgres
groupdel postgres
# Enable SSL Session Cache, add Optimized SSL Cyphers, enable SSL Stapling.
# This is part of a larger SSL optimization process described here:
# https://laravel-news.com/2016/01/optimizing-ssl-laravel-forge.
cat > /etc/nginx/conf.d/ssl_optimizations.conf <<EOT
# Session Cache Settings
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 180m;
# SSL Cyphers
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;
# Enable SSL Stapling
ssl_stapling on;
ssl_stapling_verify on;
EOT
service nginx reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment