Skip to content

Instantly share code, notes, and snippets.

@zk
Created June 12, 2012 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zk/2913549 to your computer and use it in GitHub Desktop.
Save zk/2913549 to your computer and use it in GitHub Desktop.
#user nobody;
worker_processes 1;
daemon off;
error_log /tmp/nginx.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include /usr/local/etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 0;
server {
listen 5000;
server_name zaarlydev.com *.zaarlydev.com;
proxy_set_header Host $host;
location ~ ^\/(v1|sendgrid|admin|resque|heartbeat|rev|api) {
proxy_pass http://localhost:3000;
}
location ~ ^\/(v2) {
proxy_pass http://localhost:3001;
}
location ~ ^\/(payments) {
proxy_pass http://localhost:3002;
}
location / {
proxy_pass http://zaarlydev.com:4001;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment