Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Facebook app with Erlang via Chicago Boss (series step 1)
#Edit hosts add entry for myprojectname.dev agsint 127.0.0.1
#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.
/usr/local/sbin/nginx
#Reload and verify it's up, visit http://myprojectname.dev
/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) []: = myprojectname.dev (or equiv)
server {
listen 8443;
server_name myprojectname.dev;
ssl on;
ssl_certificate /usr/local/certs/local_cert.pem;
ssl_certificate_key /usr/local/certs/local_key.pem;
ssl_session_timeout 5m;
server_name myprojectname.dev;
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)
proxy_pass http://127.0.0.1:8001;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.