Skip to content

Instantly share code, notes, and snippets.

# Seed AMI: ami-144f4d7c Debian 8.0.0 hvm x86_64 ebs us-east-1
# === Step 1 ===
sudo apt-get update
sudo apt-get upgrade
# === Step 2 ===
sudo apt-get install php5-fpm php5-pgsql phppgadmin
@eric-wu
eric-wu / dashboard-ami.sh
Last active January 4, 2016 18:09
Dashboard AMI creation
# Seed AMI: ami-e0efab88, Debian 7.8, hvm x86_64 ebs
sudo su - root
sudo echo 'deb http://cloudfront.debian.net/debian wheezy-backports main' >> /etc/apt/sources.list
sudo echo 'vm.overcommit_memory=1' >> /etc/sysctl.conf # For optimizing Redis dump
su - admin
sudo apt-get --quiet --yes --target-release wheezy-backports update
sudo apt-get --quiet --yes --target-release wheezy-backports upgrade
sudo apt-get autoclean
@eric-wu
eric-wu / nginx.conf
Last active October 27, 2022 01:45
Nginx reverse proxy set up behind a elastic load balancer and in front of a Play web app. Redirects http to https.
# This sets up a nginx reverse proxy behind a load balancer and in front of
# the Play web app. The setup is illustrated as the following:
#
# LB:80 ==> RP:80 ==> (Redirect to https)
# LB:443 ==> RP:8080 ==> Backend:9001
#
# LB -- Load Balancer
# RP -- Reverse Proxy
#
# IMPORTANT: Remove the line `include /etc/nginx/sites-enabled/*` from this config