Turns out there's a FreeBSD port which takes care of all this,
/usr/ports/www/rubygem-mongrel_cluster!

Thanks!

On Tue, Jul 29, 2008 at 8:05 PM, Redd Vinylene <[EMAIL PROTECTED]> wrote:
> hello, im attempting a mongrel_cluster + nginx + rails.
>
> i've just installed mongrel_cluster on my FreeBSD server, but there
> are no rc.d startup scripts so im not sure what to do..
>
> this is how i plan to set up my mongrel cluster:
>
> -
>
> cd /usr/home/rv/myapp
>
> mongrel_rails cluster::configure -e production -p 5000 -N 3 -c
> /usr/home/rv/myapp -a 127.0.0.1 --user www --group www
>
> mongrel_rails cluster::start
>
> -
>
> and this is my nginx.conf
>
> user www www;
>
> worker_processes 5;
>
> events { worker_connections 1024; }
>
> pid /var/run/nginx.pid;
>
> http {
>
>  sendfile on;
>
>  upstream mongrel {
>
>    server 127.0.0.1:5000;
>
>    server 127.0.0.1:5001;
>
>    server 127.0.0.1:5002;
>
>  }
>
>  server {
>
>    listen 80;
>
>    server_name myapp.com www.myapp.com;
>
>    root /usr/home/rv/myapp/public;
>
>    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;
>
>      proxy_max_temp_file_size 0;
>
>      if (-f $request_filename) {
>
>        break;
>
>      }
>
>      if (-f $request_filename/index.html) {
>
>        rewrite (.*) $1/index.html break;
>
>      }
>
>      if (-f $request_filename.html) {
>
>        rewrite (.*) $1.html break;
>
>      }
>
>      if (!-f $request_filename) {
>
>        proxy_pass http://mongrel;
>
>        break;
>
>      }
>
>    }
>
>    error_page 500 502 503 504 /500.html;
>
>    location = /500.html {
>
>      root /usr/home/rv/myapp/public;
>
>    }
>
>  }
>
> }
>
> -
>
> i found this tutorial through google, but where's the actual script?
>
> http://rubyforge.org/pipermail/mongrel-users/2006-August/000921.html
>
> many thanks,
> redd
>
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to