I dropped the use of fastcgi because I could not get popen working (see
‘[Rails] Apache2 and popen’). It works under WebBrick. Since CGI is
too
slow, I thought I’d proxy to WebBrick via Apache.
I am having routing problems now with escaped slashes in the URL.
Here’s my routes.rb:
map.connect ‘’, :controller => “wiki”
map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’
map.connect ‘:controller/:action/:id’
My request should drop down to the default action.
Here’s my apache vhost configuration:
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
RewriteEngine On
ProxyPreserveHost On
RewriteRule ^/(.*) http://localhost:3000/$1 [P,L]
I’ve tried both above, what I have commented out and what I have
uncommented
with the same results below.
Here’s the url I request and the not found error in the apache logs:
10.0.0.2 - - [06/Jan/2006:02:49:19 -0500] “GET
/repository/index/lib%2Fnet%2F HTTP/1.1” 404 618
And here’s the error in my rails log:
Processing Base#index (for 127.0.0.1 at 2006-01-06 03:01:41) [GET]
Parameters: {}
ActionController::RoutingError (Recognition failed for
“/error/HTTP_NOT_FOUND.html.var”):
c:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:469:in
recognition_failed' c:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:459:in
recognize!’
c:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in
dispatch' c:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:117:in
handle_dispatch’
c:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:83:in
service' c:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in
service’
c:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:155:in
start_thread’
c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in start' c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in
start_thread’
c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:94:in start' c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in
each’
c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in start' c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in
start’
c:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in start' c:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:69:in
dispatch’
c:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/servers/webrick.rb:59
c:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__' c:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require’
c:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
require' c:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/server.rb:28 c:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__’
c:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require' c:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
require’
c:/www/xxxxxxxxx/script/server:3
Rendering
c:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/layout.rhtml
(404 Page Not Found)
It looks like all the params are empty???
Accessing the same URL, except bypassing Apache and using the Webrick
port I
get success:
Processing RepositoryController#index (for 10.0.0.2 at 2006-01-06
03:04:26)
[GET]
Parameters: {“action”=>“index”, “id”=>“lib/net/”,
“controller”=>“repository”}
Rendering within layouts/repository
Rendering repository/index
Completed in 0.63100 (1 reqs/sec) | Rendering: 0.03000 (4%) | DB:
0.03000
(4%) | 200 OK
[http://xxxxxxxxxxxxxxxxxxxx/repository/index/lib%2Fnet%2F]
How do I fix this?
Thanks
J. Lambert