[Mongrel] Help mongrel keeps crashing...

Carl Lerche carl.lerche at verizon.net
Sat Aug 12 13:49:42 EDT 2006


Thanks for the suggestions. I will try out the pre-release and let you know 
how it goes. Also, I am using Apache 2.2.2 with mod_proxy_balancer (I 
probably should update to 2.2.3). I don't know what you mean by be on 1.1.6. 
I also don't have the sendfile gem as I know it is not recommended.

As for mongrel serving static files, I will have to play with my mod_rewrite 
configuration as that is what seems to be the problem. I will include it here 
just in case anybody might have any suggestions for that.

Thanks for all the help so far guys!

RewriteEngine On

# Make sure people go to www.djforums.com, not djforums.com
RewriteCond %{HTTP_HOST} ^djforums.com$ [NC]
RewriteRule ^(.*)$ http://www.djforums.com.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://djforums%{REQUEST_URI} [P,QSA,L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?djforums.com.*$ [NC]
RewriteRule .(gif|jpg|mov|flv|wmv|swf)$ - [F]

More information about the Mongrel-users mailing list