template-nginx.cfg.in 2.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
daemon off; # run in the foreground so supervisord can look after it

worker_processes 4;
pid $${directory:run}/nginx.pid;

events {
  worker_connections 768;
  # multi_accept on;
}

error_log $${nginx-configuration:error_log};

http {  
  
  ##
  # Basic Settings
  ##
  
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  keepalive_timeout 65;
  types_hash_max_size 2048;
  server_tokens off;

  # server_names_hash_bucket_size 64;
  # server_name_in_redirect off;

  default_type application/octet-stream;
  include ${nginx-output:mime};

  ##
  # Logging Settings
  ##
  
  access_log $${nginx-configuration:access_log};
  error_log $${nginx-configuration:error_log};

  ##
  # Gzip Settings
  ##
  
  gzip on;
  gzip_disable "msie6";

  gzip_vary on;
  gzip_proxied any;
  gzip_comp_level 6;
  gzip_buffers 16 8k;
  gzip_http_version 1.1;
51
  gzip_types text/html text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

server {
  listen [$${nginx-configuration:ip}]:$${nginx-configuration:port};

  # ssl                 on;
  # ssl_certificate $${nginx-configuration:ssl_crt};
  # ssl_certificate_key $${nginx-configuration:ssl_key};

  fastcgi_temp_path  $${directory:varnginx} 1 2;
  uwsgi_temp_path  $${directory:varnginx} 1 2;
  scgi_temp_path  $${directory:varnginx} 1 2;

  client_body_temp_path $${directory:varnginx} 1 2;
  proxy_temp_path $${directory:varnginx} 1 2;

  ## Only allow GET and HEAD request methods
  if ($request_method !~ ^(GET|HEAD)$ ) {
     return 444;
  }

  ## Serve an error 204 (No Content) for favicon.ico
  location = /favicon.ico {
    return 204;
  }
  location /renderjs
  {   
      alias ${renderjs-repository.git:location};
      autoindex on;
      disable_symlinks on;
  }
  location /jio
  {   
      alias ${jio-repository.git:location};
      autoindex on;
      disable_symlinks on;
  }
  location /rsvp
  {   
      alias ${rsvp-repository.git:location};
      autoindex on;
      disable_symlinks on;
  }
  location /uritemplate
  {   
      alias ${uritemplate-repository.git:location};
      autoindex on;
      disable_symlinks on;
  }
  location /
  {   
      root $${directory:www};
      # autoindex on;
      disable_symlinks on;
#       index index.html;
  }
}

}