Created
October 26, 2012 23:14
-
-
Save jessedearing/3962100 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user jessed staff; | |
worker_processes 2; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
client_max_body_size 10m; | |
#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
# '$status $body_bytes_sent "$http_referer" ' | |
# '"$http_user_agent" "$http_x_forwarded_for"'; | |
#access_log logs/access.log main; | |
sendfile on; | |
#tcp_nopush on; | |
keepalive_timeout 0; | |
#keepalive_timeout 65; | |
#gzip on; | |
upstream proxy_server { | |
server localhost:3000; | |
server localhost:9292; | |
} | |
upstream rewards { | |
server localhost:3001; | |
} | |
server { | |
listen 80; | |
server_name purecharity-rewards.local *.purecharity-rewards.local; | |
root /Users/jessed/code/pc/public; | |
location / { | |
try_files $uri @proxy; | |
} | |
location @proxy { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X_FORWARDED_PROTO http; | |
proxy_set_header X-Url-Scheme $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_redirect off; | |
proxy_pass http://rewards; | |
} | |
} | |
server { | |
listen 80; | |
server_name scrummageapp.local *.scrummageapp.local; | |
root /Users/jessed/code/pc/public; | |
location / { | |
try_files $uri @proxy; | |
} | |
location @proxy { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Host $http_host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X_FORWARDED_PROTO http; | |
proxy_set_header X-Url-Scheme $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_redirect off; | |
proxy_pass http://proxy_server; | |
} | |
} | |
server { | |
listen 80; | |
server_name purecharity.local *.purecharity.local *.pure.local; | |
root /Users/jessed/code/pc/public; | |
access_log /usr/local/var/nginx/access_log; | |
error_log /usr/local/var/nginx/error_log; | |
location / { | |
try_files $uri @proxy; | |
} | |
location @proxy { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Host $http_host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X_FORWARDED_PROTO http; | |
proxy_set_header X-Url-Scheme $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_redirect off; | |
proxy_pass http://proxy_server; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment