Skip to content

Instantly share code, notes, and snippets.

@itsNikolay
Created March 10, 2013 18:57
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 itsNikolay/5129883 to your computer and use it in GitHub Desktop.
Save itsNikolay/5129883 to your computer and use it in GitHub Desktop.
worker_processes 1;
pid /tmp/nginx.pid;
error_log /tmp/nginx.error.log;
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
}
http {
default_type application/octet-stream;
access_log /tmp/nginx.access.log combined;
sendfile on;
tcp_nopush on; # off may be better for *some* Comet/long-poll stuff
tcp_nodelay off; # on may be better for some Comet/long-poll stuff
# gzip on;
# gzip_http_version 1.0;
# gzip_proxied any;
# gzip_min_length 500;
# gzip_disable "MSIE [1-6]\.";
# gzip_types text/plain text/xml text/css
# text/comma-separated-values
# text/javascript application/x-javascript
# application/atom+xml;
upstream wood-awesome {
server unix:/tmp/wood-awesome.app.sock fail_timeout=0;
}
server {
listen 80 default; # for Linux
client_max_body_size 4G;
#server_name _;
keepalive_timeout 5;
root /home/user/projects/wood-awesome/current/public;
try_files $uri/index.html $uri.html $uri @app;
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://wood-awesome;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment