Skip to content

Instantly share code, notes, and snippets.

@vincentbernat
Created August 14, 2011 17:23
Show Gist options
  • Select an option

  • Save vincentbernat/1145093 to your computer and use it in GitHub Desktop.

Select an option

Save vincentbernat/1145093 to your computer and use it in GitHub Desktop.

Revisions

  1. vincentbernat renamed this gist Oct 11, 2011. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.txt → nginx.conf
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,8 @@ pid /var/run/nginx.pid;

    events {
    use epoll;
    multi_accept on;
    multi_accept off;
    accept_mutex off;
    worker_connections 65536;
    }

  2. vincentbernat revised this gist Aug 14, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@ http {
    ssl on;
    ssl_certificate /WOO/server1024.crt;
    ssl_certificate_key /WOO/server1024.key;
    ssl_session_cache shared:SSL:10m;
    ssl_session_cache shared:SSL:500m;
    ssl_ciphers ALL;

    location / {
  3. vincentbernat created this gist Aug 14, 2011.
    41 changes: 41 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    user root;
    worker_processes 2;
    worker_rlimit_nofile 90000;
    error_log /usr/local/nginx/logs/error.log;
    pid /var/run/nginx.pid;

    events {
    use epoll;
    multi_accept on;
    worker_connections 65536;
    }

    http {
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    gzip off;
    access_log off;
    proxy_buffering off;

    upstream backend {
    server 172.31.208.2 max_fails=3 fail_timeout=15s;
    server 172.31.209.2 max_fails=3 fail_timeout=15s;
    server 172.31.210.2 max_fails=3 fail_timeout=15s;
    server 172.31.211.2 max_fails=3 fail_timeout=15s;
    }

    server {
    listen 443 ssl default_server;
    ssl on;
    ssl_certificate /WOO/server1024.crt;
    ssl_certificate_key /WOO/server1024.key;
    ssl_session_cache shared:SSL:10m;
    ssl_ciphers ALL;

    location / {
    proxy_pass http://backend;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }
    }