Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Facebook app with Erlang via Chicago Boss (series step 1)
#Edit hosts add entry for agsint
#Install nginx via brew
brew update
brew install nginx
#Scan config, alter as needed
vi /usr/local/etc/nginx/nginx.conf
#Assuming we leave it on port 8080, you can start nginx now.
#Reload and verify it's up, visit
/usr/local/sbin/nginx -s reload
#SSL - locally
mkdir -p /usr/local/certs && cd /usr/local/certs
openssl genrsa -out local_key.pem 2048
openssl req -new -x509 -key local_key.pem -out local_cert.pem -days 3650
#Ensure Common Name (eg, YOUR name) []: = (or equiv)
server {
listen 8443;
ssl on;
ssl_certificate /usr/local/certs/local_cert.pem;
ssl_certificate_key /usr/local/certs/local_key.pem;
ssl_session_timeout 5m;
access_log /srv/www/myprojectname/shared/log/access.log;
error_log /srv/www/myprojectname/shared/log/error.log;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_connect_timeout 74; # max is 75s
proxy_redirect off;
# Proxy to Backend (Simple Production will differ)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment