Forum: Mongrel Mongrel don't render html if i use .htaccess

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
71f4729508dca7bbfc2da874a5c6ab6b?d=identicon&s=25 Wim Van es (wimves)
on 2010-10-31 13:21
Hy,

Being new here i hope somebody  can help me.

Setup:

CentOS 5.5
ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-linux]
Rails 2.3.8
mongrel 1.1.5
rack 1.2.1, 1.0.1

Problem:

If i use a .htaccess like

RewriteEngine on

RewriteCond %{HTTP_HOST} ^my.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.my.domain.com$
RewriteRule ^(.*)$ "http\:\/\/127\.0\.0\.1\:12001\/$1" [P,L]

on a app what is using a DB i see only html source. Navigating to
my.domain.com:12001 works fine. When i make a app with a simple var in
the controller and a view that echo's this var i don't have any trouble.

What i have figured out:

In the mongrel log i found

Error calling Dispatcher.dispatch #<NameError: undefined local variable
or method `head' for #<Mongrel::CGIWrapper:0xb712ffa4>>
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:108:in
`send_cookies'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:136:in
`out'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_response.rb:65:in
`start'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:135:in
`out'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:81:in
`process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
`each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in
`each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load'
/usr/bin/mongrel_rails:19

I edit mongrel/lib/mongrel/cgi.rb as described in
http://github.com/fauna/mongrel/blob/master/lib/mo...

I found cookie's from my.domain.com in my browser

Can anyone point me in the right direction?

Thanks!
This topic is locked and can not be replied to.