|
@@ -14,21 +14,21 @@
|
|
|
|
|
|
# you generally only need one nginx worker unless you're serving
|
|
# you generally only need one nginx worker unless you're serving
|
|
# large amounts of static files which require blocking disk reads
|
|
# large amounts of static files which require blocking disk reads
|
|
-worker_processes 1;
|
|
|
|
|
|
+worker_processes 8;
|
|
|
|
|
|
# # drop privileges, root is needed on most systems for binding to port 80
|
|
# # drop privileges, root is needed on most systems for binding to port 80
|
|
# # (or anything < 1024). Capability-based security may be available for
|
|
# # (or anything < 1024). Capability-based security may be available for
|
|
# # your system and worth checking out so you won't need to be root to
|
|
# # your system and worth checking out so you won't need to be root to
|
|
# # start nginx to bind on 80
|
|
# # start nginx to bind on 80
|
|
# user nobody nogroup; # for systems with a "nogroup"
|
|
# user nobody nogroup; # for systems with a "nogroup"
|
|
-user nobody nobody; # for systems with "nobody" as a group instead
|
|
|
|
|
|
+#user nobody nobody; # for systems with "nobody" as a group instead
|
|
|
|
|
|
# Feel free to change all paths to suite your needs here, of course
|
|
# Feel free to change all paths to suite your needs here, of course
|
|
pid /tmp/nginx.pid;
|
|
pid /tmp/nginx.pid;
|
|
error_log /tmp/nginx.error.log;
|
|
error_log /tmp/nginx.error.log;
|
|
|
|
|
|
events {
|
|
events {
|
|
- worker_connections 1024; # increase if you have lots of clients
|
|
|
|
|
|
+ worker_connections 4096; # increase if you have lots of clients
|
|
accept_mutex off; # "on" if nginx worker_processes > 1
|
|
accept_mutex off; # "on" if nginx worker_processes > 1
|
|
use epoll; # enable for Linux 2.6+
|
|
use epoll; # enable for Linux 2.6+
|
|
# use kqueue; # enable for FreeBSD, OSX
|
|
# use kqueue; # enable for FreeBSD, OSX
|
|
@@ -36,7 +36,7 @@ events {
|
|
|
|
|
|
http {
|
|
http {
|
|
# nginx will find this file in the config directory set at nginx build time
|
|
# nginx will find this file in the config directory set at nginx build time
|
|
- include mime.types;
|
|
|
|
|
|
+ include /usr/local/nginx/conf/mime.types;
|
|
|
|
|
|
# fallback in case we can't determine a type
|
|
# fallback in case we can't determine a type
|
|
default_type application/octet-stream;
|
|
default_type application/octet-stream;
|
|
@@ -57,15 +57,15 @@ http {
|
|
# to disable gzip for clients who don't get gzip/deflate right.
|
|
# to disable gzip for clients who don't get gzip/deflate right.
|
|
# There are other gzip settings that may be needed used to deal with
|
|
# There are other gzip settings that may be needed used to deal with
|
|
# bad clients out there, see http://wiki.nginx.org/NginxHttpGzipModule
|
|
# bad clients out there, see http://wiki.nginx.org/NginxHttpGzipModule
|
|
- gzip on;
|
|
|
|
- gzip_http_version 1.0;
|
|
|
|
- gzip_proxied any;
|
|
|
|
- gzip_min_length 500;
|
|
|
|
- gzip_disable "MSIE [1-6]\.";
|
|
|
|
- gzip_types text/plain text/html text/xml text/css
|
|
|
|
- text/comma-separated-values
|
|
|
|
- text/javascript application/x-javascript
|
|
|
|
- application/atom+xml;
|
|
|
|
|
|
+ #gzip on;
|
|
|
|
+ #gzip_http_version 1.0;
|
|
|
|
+ #gzip_proxied any;
|
|
|
|
+ #gzip_min_length 500;
|
|
|
|
+ #gzip_disable "MSIE [1-6]\.";
|
|
|
|
+ #gzip_types text/plain text/html text/xml text/css
|
|
|
|
+ # text/comma-separated-values
|
|
|
|
+ # text/javascript application/x-javascript
|
|
|
|
+ # application/atom+xml;
|
|
|
|
|
|
# this can be any application server, not just Unicorn/Rainbows!
|
|
# this can be any application server, not just Unicorn/Rainbows!
|
|
upstream app_server {
|
|
upstream app_server {
|
|
@@ -84,7 +84,7 @@ http {
|
|
|
|
|
|
server {
|
|
server {
|
|
# enable one of the following if you're on Linux or FreeBSD
|
|
# enable one of the following if you're on Linux or FreeBSD
|
|
- # listen 80 default deferred; # for Linux
|
|
|
|
|
|
+ listen 80 default deferred; # for Linux
|
|
# listen 80 default accept_filter=httpready; # for FreeBSD
|
|
# listen 80 default accept_filter=httpready; # for FreeBSD
|
|
|
|
|
|
# If you have IPv6, you'll likely want to have two separate listeners.
|
|
# If you have IPv6, you'll likely want to have two separate listeners.
|
|
@@ -101,7 +101,7 @@ http {
|
|
# ~2 seconds is often enough for most folks to parse HTML/CSS and
|
|
# ~2 seconds is often enough for most folks to parse HTML/CSS and
|
|
# retrieve needed images/icons/frames, connections are cheap in
|
|
# retrieve needed images/icons/frames, connections are cheap in
|
|
# nginx so increasing this is generally safe...
|
|
# nginx so increasing this is generally safe...
|
|
- keepalive_timeout 5;
|
|
|
|
|
|
+ keepalive_timeout 10;
|
|
|
|
|
|
# path for static files
|
|
# path for static files
|
|
root /path/to/app/current/public;
|
|
root /path/to/app/current/public;
|