[Mongrel] Service Temporarily Unavailable when using apache

Patrick Aljord patcito at gmail.com
Mon Nov 13 18:17:19 EST 2006

hey all,
I'm trying to do a mongrel_cluster+apache2 config.
this is my testapp.conf:
<VirtualHost *:80>
  Include /etc/apache2/conf.d/testapp.common

#  ErrorLog logs/testapp_errors_log
 # CustomLog logs/testapp_log combined

this is my testapp.common:
 ServerName myapp.com
  DocumentRoot /home/patcito/testapp/public/

  <Directory "/home/patcito/testapp/public/">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

  RewriteEngine On

  # Make sure people go to www.myapp.com, not myapp.com
  RewriteCond %{HTTP_HOST} ^myapp.com$ [NC]
  RewriteRule ^(.*)$ http://www.myapp.com$1 [R=301,L]
  # Yes, I've read no-www.com, but my site already has much Google-Fu on
  # www.blah.com. Feel free to comment this out.

  # Uncomment for rewrite debugging
  #RewriteLog logs/myapp_rewrite_log
  #RewriteLogLevel 9

  # Check for maintenance file and redirect all requests
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /system/maintenance.html [L]

  # Rewrite index to check for static
  RewriteRule ^/$ /index.html [QSA]

  # Rewrite to check for Rails cached page
  RewriteRule ^([^.]+)$ $1.html [QSA]

  # Redirect all non-static requests to cluster
  RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]

and this is my testapp.proxy_cluster.conf:
<Proxy balancer://mongrel_cluster>

now when I start my mongrel_cluster I get the index page but I get a
Service Temporarily Unavailable when I click on the pink box to check
my environment.
Looking at my mongrel log I get that:

`gem_original_require': no such file to load --
/etc/mongrel_cluster/config/environment (LoadError)

this is what my testapp.yml contains:
log_file: /home/patcito/testapp/log/mongrel.log
port: "8000"
environment: development
address: xx.yy.zz.tt
pid_file: /home/patcito/testapp/log/mongrel.pid
servers: 3
docroot: /home/patcito/testapp/public

any idea what I did wrong?

thanx in advance


More information about the Mongrel-users mailing list