Hi all, 

sorry for late reply.

On Fri, Jul 21, 2006 at 12:04:36PM -0400, Zed Shaw wrote:
> On Fri, 2006-07-21 at 12:26 +0200, Jens Kraemer wrote:
> > Why not point people to the debs in the first place ? I'll have new 
> > packages up as soon as 0.3.13.4 is out. 
> 
> Can you crank up a short e-mail of instructions for this and I'll put it
> in the Debian uber doc I'm compiling?  That's basically what I'm saying
> in the "final option".

Ok, so here's a stripped down version of what I've written on my blog
(http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge):


Note: This assumes a clean Sarge install, things might get a bit
difficult if there is an existing ruby / rubygems installation in
/usr/local.

========== Install Ruby 1.8.4 + Mongrel =========== 

- add the following lines to /etc/apt/sources.list
deb http://debian.jkraemer.net/apt  sarge main contrib non-free
deb http://ftp.de.debian.org/debian/ experimental main contrib

- edit /etc/apt/preferences
Package: *
Pin: release a=experimental
Pin-Priority: 100

- edit /etc/apt/apt.conf
APT::Default-Release "stable";

- go get it, pen is completely optional
apt-get update && apt-get install mongrel pen

========== Set up your Application =========== 

Apache 2.0/Pen/Mongrel

- create config file for your app in /etc/mongrel/sites-enabled/ :
# RAILS_ROOT of your application
dir=/home/webapps/your_application/current
# port the first mongrel instance should listen to, additional instances
# will use ports above this
port=8100
# number of mongrel instances
servers=3
# port pen will listen on (if installed)
proxy_port=8001

- fire up mongrel
/etc/init.d/mongrel start

- you should now have 3 mongrels running, listening on ports 8100-8102
- if installed, pen will be listening on port 8001, forwarding connections
  to the mongrels.

- Rewrite rules for Apache 2.0 for forwarding to pen:

RewriteEngine On
RewriteRule ^/$ /index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}   !-f
# 8001 is the proxy_port from mongrel configuration of your app
RewriteRule .* http://localhost:8001%{REQUEST_URI} [P,QSA]



The experimental rubygems stuff is not that nice, but I didn't manage
to build a Sarge package for this until now.

Maybe providing dummy Debian packages for people who have already 
installed Ruby and/or Rubygems from source would be a good idea, too.


Jens


-- 
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       [EMAIL PROTECTED]
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to