Skip to content

Instantly share code, notes, and snippets.

@joeljackson
Created August 12, 2014 22:25
Show Gist options
  • Save joeljackson/37c3316b9606f432f17f to your computer and use it in GitHub Desktop.
Save joeljackson/37c3316b9606f432f17f to your computer and use it in GitHub Desktop.
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 200;
#gzip on;
server {
listen 80;
server_name honest.dev;
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_redirect off;
try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby;
}
location @ruby {
proxy_pass http://127.0.0.1:3000;
}
}
# HTTPS server
#
server {
listen 443 ssl;
server_name honest.dev;
ssl_certificate /usr/local/Cellar/nginx/1.6.0_1/server.crt;
ssl_certificate_key /usr/local/Cellar/nginx/1.6.0_1/server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
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_redirect off;
try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby;
}
location @ruby {
proxy_pass http://127.0.0.1:3000;
}
}
server {
listen 80;
server_name scribe.honest.dev;
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_redirect off;
try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby;
}
location @ruby {
proxy_pass http://127.0.0.1:3001;
}
}
# HTTPS server
#
server {
listen 443 ssl;
server_name scribe.honest.dev;
ssl_certificate /usr/local/Cellar/nginx/1.6.0_1/server.crt;
ssl_certificate_key /usr/local/Cellar/nginx/1.6.0_1/server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
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_redirect off;
try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby;
}
location @ruby {
proxy_pass http://127.0.0.1:3001;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment