Skip to content

Instantly share code, notes, and snippets.

@eric-wu
Last active August 29, 2015 14:20
Show Gist options
  • Save eric-wu/5f8a399d6f8e61d9f7c9 to your computer and use it in GitHub Desktop.
Save eric-wu/5f8a399d6f8e61d9f7c9 to your computer and use it in GitHub Desktop.
# 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
# phppgadmin introduces dependency to Apache
# Installing Apache should also start the Apache web server
# Test the Apache server from a web browser
# === Step 3 ===
sudo vi /etc/apache2/conf-enabled/phppgadmin.conf
# Change "Require local" to "Require all granted"
sudo service apache2 restart
# Test the url "/phppgadmin/"
# === Step 4 ===
sudo vi /etc/phppgadmin/config.inc.php
# Add the remote Redshift server
# Make sure the EC2 is launched using the correct security group
sudo service apache2 restart
# Test the url "/phppgadmin/"
# === Step 5 ===
# https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04
# Enable the SSL module
sudo a2enmod ssl
sudo service apache2 restart
# Make a self-signed cert
sudo mkdir /etc/apache2/ssl
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
sudo vi /etc/apache2/sites-available/default-ssl.conf
# SSLCertificateFile /etc/apache2/ssl/apache.crt
# SSLCertificateKeyFile /etc/apache2/ssl/apache.key
sudo a2ensite default-ssl.conf
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment