Hello
One of ours sites has just lost all it’s images and styling.
It’s not a very busy site at all, so it might have been not working
properly for some time now.
Here’s how we start it in Lighty
$HTTP["host"] == "gregynog.glam.ac.uk" {
server.document-root = "/www/rails/greg/current/public/"
server.error-handler-404 = "/dispatch.fcgi"
accesslog.filename = "/www/rails/greg/current/log/access.log"
server.errorlog = "/www/rails/greg/current/log/error.log"
fastcgi.server = (".fcgi" =>
("greg" =>
( "socket" => "/www/rails/greg/shared/tmp/greg-0.socket" ),
( "socket" => "/www/rails/greg/shared/tmp/greg-1.socket" )))
}
Here’s an example of one of the erros from the production log
ActionController::RoutingError (Recognition failed for
"/img/gregynog.jpg"):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
`recognition_failed'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:in
`recognize!'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in
`process!'
/www/rails/greg/current/public/dispatch.fcgi:24
And finally here’s the routes.rb form the application
ActionController::Routing::Routes.draw do |map|
map.accessibility
'/accessibility',:controller=>'pages',:action=>'accessibility'
map.locationmap
'/location',:controller=>'pages',:action=>'locationmap'
map.signup '/signup',:controller=>'people',:action=>'new'
map.welsh
'/cymraeg',:controller=>'pages',:action=>'view',:language=>'cy',:title=>'welshindex'
map.page
'/page/:title',:controller=>'pages',:action=>'view',:language=>'en'
map.tudalen
'/tudalen/:title',:controller=>'pages',:action=>'view',:language=>'cy'
map.connect
'',:controller=>'pages',:action=>'view',:language=>'en',:title=>'index'
map.connect ':controller/:action/:id'
end
We’re not serving the img folder with a controller, but were using the
lighttpd to serve the static content, I think.
Anyone got any ideas what’s happening?