[DRE-commits] r3228 - in packages-wip/thin/trunk/debian: . examples

ryan52-guest at alioth.debian.org ryan52-guest at alioth.debian.org
Mon Feb 23 01:09:59 UTC 2009


Author: ryan52-guest
Date: 2009-02-23 01:09:59 +0000 (Mon, 23 Feb 2009)
New Revision: 3228

Added:
   packages-wip/thin/trunk/debian/examples/
   packages-wip/thin/trunk/debian/examples/myapp.nginx.conf
   packages-wip/thin/trunk/debian/examples/myapp.yml
   packages-wip/thin/trunk/debian/thin1.8.examples
Modified:
   packages-wip/thin/trunk/debian/control
Log:
example configurations for thin and nginx

Modified: packages-wip/thin/trunk/debian/control
===================================================================
--- packages-wip/thin/trunk/debian/control	2009-02-23 01:08:48 UTC (rev 3227)
+++ packages-wip/thin/trunk/debian/control	2009-02-23 01:09:59 UTC (rev 3228)
@@ -12,6 +12,7 @@
 Package: thin1.8
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, librack-ruby1.8, ruby1.8, libeventmachine-ruby1.8, libdaemons-ruby1.8
+Suggests: nginx
 Description: fast and very simple Ruby web server (ruby 1.8 version)
  Thin is a Ruby web server that glues together 3 of the best Ruby
  libraries in web history:

Added: packages-wip/thin/trunk/debian/examples/myapp.nginx.conf
===================================================================
--- packages-wip/thin/trunk/debian/examples/myapp.nginx.conf	                        (rev 0)
+++ packages-wip/thin/trunk/debian/examples/myapp.nginx.conf	2009-02-23 01:09:59 UTC (rev 3228)
@@ -0,0 +1,34 @@
+# drop this into /etc/nginx/sites-enabled/ and tweak
+# this nginx config reverse proxies to the 3 running thin instances
+# started by the myapp.yml example
+
+upstream thin {
+   server   unix:/tmp/thin.0.sock;
+   server   unix:/tmp/thin.1.sock;
+   server   unix:/tmp/thin.2.sock;
+}
+
+server {
+  listen 80;
+  root /var/www/myapp/public/;
+  access_log /var/www/myapp/log/nginx.access.log;
+  error_log /var/www/myapp/log/nginx.error.log;
+
+  location / {
+    proxy_set_header X-Real-IP $remote_addr;
+    proxy_set_header Host $host;
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+    if (-f $request_filename) {
+      break;
+    }
+
+    if (!-f $request_filename) {
+      proxy_pass http://thin;
+      break;
+    }
+  }
+
+  error_page 500 502 503 504 /500.html;
+  error_page 404 403 /404.html;
+}

Added: packages-wip/thin/trunk/debian/examples/myapp.yml
===================================================================
--- packages-wip/thin/trunk/debian/examples/myapp.yml	                        (rev 0)
+++ packages-wip/thin/trunk/debian/examples/myapp.yml	2009-02-23 01:09:59 UTC (rev 3228)
@@ -0,0 +1,19 @@
+# generated by "thin config"
+# drop this into /etc/thin1.8/ and tweak
+# or run "thin config" to generate a config file yourself
+--- 
+pid: tmp/pids/thin.pid
+timeout: 30
+log: log/thin.log
+max_conns: 1024
+require: []
+
+environment: production
+max_persistent_conns: 512
+no-epoll: true
+servers: 3
+daemonize: true
+socket: /tmp/thin.sock
+chdir: /var/www/myapp/
+user: www-data
+group: www-data

Added: packages-wip/thin/trunk/debian/thin1.8.examples
===================================================================
--- packages-wip/thin/trunk/debian/thin1.8.examples	                        (rev 0)
+++ packages-wip/thin/trunk/debian/thin1.8.examples	2009-02-23 01:09:59 UTC (rev 3228)
@@ -0,0 +1 @@
+debian/examples/*




More information about the Pkg-ruby-extras-commits mailing list