Created
November 16, 2009 05:13
-
-
Save petitbon/235753 to your computer and use it in GitHub Desktop.
bootstrap_os_x_nginx.conf
This file contains 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 nobody; | |
worker_processes 2; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
error_log logs/error.log info; | |
# Pid | |
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
#tcp_nopush on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
gzip on; | |
# if a precompiled gzip of the file exists, use it and force http proxies | |
# to use separate cache's based on User-Agent | |
gzip_static on; | |
gzip_min_length 2000; | |
gzip_buffers 16 8k; | |
gzip_types text/plain text/html text/css image/x-icon application/xml application/xml+rss text/javascript; | |
gzip_disable "MSIE [1-6] \."; | |
gzip_vary on; | |
gzip_comp_level 2; | |
gzip_proxied any; | |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
root /Users/fred/Sites ; | |
autoindex on; | |
index index.html index.htm; | |
} | |
} | |
passenger_root /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.2; | |
passenger_max_pool_size 8; | |
passenger_max_instances_per_app 1; | |
# The maximum number of seconds that an application instance may be idle. | |
# That is, if an application instance hasn’t received any traffic after the given number of seconds, | |
# then it will be shutdown in order to conserve memory. | |
passenger_pool_idle_time 3600; | |
# Project 1 | |
server { | |
listen 80; | |
client_max_body_size 250M; | |
server_name project1.local; | |
root /Users/fred/rails/project1/public; | |
passenger_enabled on; | |
rails_env development; | |
access_log /Users/fred/rails/project1/log/nginx.access.log; | |
error_log /Users/fred/rails/project1/log/nginx.error.log info; | |
} | |
# Project 2 | |
server { | |
listen 80; | |
client_max_body_size 250M; | |
server_name project2.local; | |
root /Users/fred/rails/project2/public; | |
passenger_enabled on; | |
rails_env development; | |
access_log /Users/fred/rails/project2/log/nginx.access.log; | |
error_log /Users/fred/rails/project2/log/nginx.error.log info; | |
} | |
# Project 3 | |
server { | |
listen 80; | |
client_max_body_size 250M; | |
server_name project3.local; | |
root /Users/fred/rails/project3/public; | |
passenger_enabled on; | |
rails_env development; | |
access_log /Users/fred/rails/project3/log/nginx.access.log; | |
error_log /Users/fred/rails/project3/log/nginx.error.log info; | |
} | |
# And so on... as many projects as you want | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment