   master_process #{if inDevEnvironment then "off" else "on"};
 
 
-  error_log  logs/error.log;
-  error_log  logs/error.log  notice;
-  error_log  logs/error.log  info;
+  #error_log  logs/error.log;
+  #error_log  logs/error.log  notice;
+  #error_log  logs/error.log  info;
 
   #{if inDevEnvironment then '' else 'pid /var/run/nginx.pid;'}
 
   events {
-    worker_connections 20;
+    worker_connections 20000;
     multi_accept on;
     #{event_mechanism}
   }


  return stub

createRootLocation = (KONFIG) ->
  return "" if isProxy KONFIG.ebEnvName

  proxy = KONFIG.marketingPagesURL
  if KONFIG.environment in ["dev", "default", "sandbox"]
    proxy = "http://webserver"

  return """
      location ~*(^(\/(Pricing|About|Legal|Features|Blog|Docs))) {
          proxy_set_header      Host            $host;
          proxy_set_header      X-Host          $host; # for customisation
          proxy_set_header      X-Real-IP       $remote_addr;
          proxy_set_header      X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_next_upstream   error timeout   invalid_header http_500;
          proxy_connect_timeout 30;

          if ($host !~* ^(dev|default|sandbox|latest|www)) {
             return 302 /;
          }

        proxy_set_header      X-name "olmamis";

          proxy_pass #{proxy};
      }
      """

createAssetLocation = ({locationConf, KONFIG}) ->
  { expires, relativePath, proxyPass,
    location, extraParamsStr } = locationConf


        # try again with another upstream if there is an error
        proxy_next_upstream   error timeout   invalid_header http_500;

        # proxy should connect in 1 second
        proxy_connect_timeout 5;
