incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wso...@apache.org
Subject svn commit: r738379 - in /incubator/olio/webapp/rails/trunk/etc: ./ nginx.conf
Date Wed, 28 Jan 2009 06:38:20 GMT
Author: wsobel
Date: Wed Jan 28 06:38:19 2009
New Revision: 738379

URL: http://svn.apache.org/viewvc?rev=738379&view=rev
Log:
Added nginx configuration

Added:
    incubator/olio/webapp/rails/trunk/etc/
    incubator/olio/webapp/rails/trunk/etc/nginx.conf

Added: incubator/olio/webapp/rails/trunk/etc/nginx.conf
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/etc/nginx.conf?rev=738379&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/etc/nginx.conf (added)
+++ incubator/olio/webapp/rails/trunk/etc/nginx.conf Wed Jan 28 06:38:19 2009
@@ -0,0 +1,60 @@
+user  root;
+worker_processes  4;
+
+#error_log   logs/error.log debug;
+#error_log  logs/error.log  notice;
+error_log  logs/error.log  info;
+pid        logs/nginx.pid;
+events {
+    worker_connections  1024;
+}
+http {
+  include        mime.types;
+  default_type   application/octet-stream;
+  sendfile       on;
+  tcp_nopush     on;
+  keepalive_timeout  65;
+  tcp_nodelay        on;
+
+  # Faban does not support gzip
+  #gzip  on;
+  #gzip_min_length  1100;
+  #gzip_buffers     4 8k;
+  #gzip_types       text/plain;
+  upstream thin {	
+    server 127.0.0.1:3000;
+    server 127.0.0.1:3001;
+    server 127.0.0.1:3002;
+    server 127.0.0.1:3003;
+  }
+  server {
+    listen       80;
+    server_name  example.com;
+    root /var/app/olio/public;
+    index  index.html index.htm;
+    location / {
+      proxy_set_header  X-Real-IP  $remote_addr;
+      proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header Host $http_host;
+      proxy_redirect false;
+
+      # Caching support
+      if (-f $request_filename/index.html) {
+        rewrite (.*) $1/index.html break;
+      }
+      if (-f $request_filename.html) {
+        rewrite (.*) $1.html break;
+      }
+
+      # Reverse proxy
+      if (!-f $request_filename) {
+        proxy_pass http://thin;
+        break;
+      }
+    }
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   html;
+    }
+  }
+}



Mime
View raw message