#!/bin/bash

## DOWNLOADS
#sudo curl -OL h ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.20.tar.gz > /usr/local/src/pcre-8.20.tar.gz
#sudo curl -OL h http://nginx.org/download/nginx-1.1.8.tar.gz > /usr/local/src/nginx-1.1.8.tar.gz

## Install PCRE
sudo mkdir -p /usr/local/src
cd /usr/local/src
#tar xvzf pcre-8.20.tar.gz
cd pcre-8.20
./configure --prefix=/usr/local
make
sudo make install
cd ..

## Install Nginx
#tar xvzf nginx-1.1.8.tar.gz
cd nginx-1.1.8
./configure --prefix=/usr/local --with-http_ssl_module
make
sudo make install

## Start Nginx
#sudo /usr/local/sbin/nginx
