## # Basic config modified only slightly from http://brainspl.at/articles/2007/01/03/new-nginx-conf-with-optimizations # # Turns SSI on and uses locations as defined in install-nginx.sh script. # # See also http://topfunky.net/svn/shovel/nginx # # USE AT YOUR OWN RISK! # user and group to run as user deploy deploy; # number of nginx workers worker_processes 6; # pid of nginx master process pid /var/run/nginx.pid; # Number of worker connections. 1024 is a good default events { worker_connections 1024; } # start the http module where we config http access. http { # pull in mime-types. You can break out your config # into as many include's as you want to make it cleaner include /usr/local/nginx/conf/mime.types; # set a default type for the rare situation that # nothing matches from the mimie-type include default_type application/octet-stream; # configure log format log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; # main access log access_log /var/log/nginx_access.log main; # main error log error_log /var/log/nginx_error.log debug; # no sendfile on OSX sendfile on; # These are good default values. tcp_nopush on; tcp_nodelay off; # output compression saves bandwidth gzip on; gzip_http_version 1.0; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; # this is where you define your mongrel clusters. # you need one of these blocks for each cluster # and each one needs its own name to refer to it later. # # Rename to mongrel_site1, mongrel_site2, etc if using # virtual hosts. # include your apps nginx config file paths here include /var/www/apps/myapp/config/nginx_ruby.conf; }