Skip to content

Commit

Permalink
include better example confs
Browse files Browse the repository at this point in the history
  • Loading branch information
trevnorris committed May 9, 2012
1 parent 49be232 commit 74d4848
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
28 changes: 28 additions & 0 deletions conf/README
@@ -0,0 +1,28 @@
To get around the open file limit, do the following (for Ubuntu):

sudo vim /etc/sysctl.conf

Add the following line:
fs.file-max = 65000

sudo vim /etc/security/limits.conf

Add the following lines:
www-data soft nofile 9000
www-data hard nofile 65000

(restart for the above to take affect)

sudo vim /etc/pam.d/common-session

Add the following line:
session required pam_limits.so

sudo sysctl -p

sudo vim /etc/nginx/nginx.conf

Add the following line:
worker_rlimit_nofile 9000;

sudo service nginx restart
18 changes: 13 additions & 5 deletions conf/nginx.conf
@@ -1,9 +1,15 @@
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
user www-data;
worker_processes 8;
pid /var/run/nginx.pid;
worker_rlimit_nofile 9000;

events {
worker_connections 19000;
}

http {

# setup list of socket files that will receive http requests
upstream mysockets {
server unix:/tmp/socket-test/multiserv1.sock;
server unix:/tmp/socket-test/multiserv2.sock;
Expand All @@ -18,10 +24,12 @@ server {
location / {
proxy_pass http://mysockets;
}
# browsers will auto request this file, and we don't care
location = /favicon.ico {
access_log off;
log_not_found off;
empty_gif;
}
}

}

0 comments on commit 74d4848

Please sign in to comment.