worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 5; gzip on; upstream backend { server 127.0.0.1:8081; server 127.0.0.1:8082; server 127.0.0.1:8083; server 127.0.0.1:8084; } server { listen 127.0.0.1:80; server_name mydomain.com www.mydomain.com; location ~ (/dyn/test1|/dyn/test2|/dyn/test3|/dyn/test4|/dyn/test5|/dyn/test6) { proxy_pass http://backend; } location /index.html { expires 0; add_header Cache-Control private; root html\mydomain; } location / { if ($request_filename ~* ^.+.asp$) { rewrite (.*)$ http://www.mydomain.com permanent; } root html\mydomain; index index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }