This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 12th, 2013  |  syntax: None  |  size: 1.18 KB  |  views: 80  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. worker_processes  1;
  3.  
  4.  
  5.  
  6. events {
  7.     worker_connections  1024;
  8. }
  9.  
  10.  
  11. http {
  12.     include       mime.types;
  13.     default_type  application/octet-stream;
  14.  
  15.  
  16.     sendfile        on;
  17.  
  18.     keepalive_timeout  5;
  19.  
  20.     gzip  on;
  21.    
  22.     upstream backend  {
  23.       server 127.0.0.1:8081;
  24.       server 127.0.0.1:8082;
  25.       server 127.0.0.1:8083;
  26.       server 127.0.0.1:8084;
  27.     }    
  28.  
  29.     server {
  30.         listen       127.0.0.1:80;
  31.         server_name  mydomain.com www.mydomain.com;
  32.  
  33.        
  34.         location ~ (/dyn/test1|/dyn/test2|/dyn/test3|/dyn/test4|/dyn/test5|/dyn/test6)  {
  35.             proxy_pass   http://backend;
  36.         }
  37.  
  38.         location  /index.html {
  39.             expires 0;
  40.             add_header        Cache-Control private;
  41.             root   html\mydomain;
  42.         }
  43.        
  44.  
  45.         location / {
  46.             if ($request_filename ~* ^.+.asp$) {
  47.               rewrite (.*)$ http://www.mydomain.com permanent;
  48.             }        
  49.             root   html\mydomain;
  50.             index  index.html;
  51.         }
  52.  
  53.  
  54.         error_page   500 502 503 504  /50x.html;
  55.         location = /50x.html {
  56.             root   html;
  57.         }
  58.  
  59.     }
  60.  
  61. }
clone this paste RAW Paste Data