Brian Schwartz

Joined

1,250 Experience
0 Lessons Completed
1 Question Solved

Activity

Not seeing anything in your comment? Markdown fail?

Alright, here's from production.log for one of the files. Getting them consistently

Exception: ActionController::RoutingError: No route matches [GET] "/clients/xxx/xxx.mp4"
Status Code404

I've tried a few tweaks of configuration, here's the latest:

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

      server_name xxx;
      passenger_enabled on;
      rails_env    production;
      root         /home/deploy/xxx/current/public;

      # redirect server error pages to the static page /50x.html
      #@error_page   500 502 503 504  /50x.html;

      location = /50x.html {
          root   html;
          passenger_document_root /home/deploy/xxx/current/public;

      }

}

Hey Chris (and others),

Switched to nginx from Apache and following the deploy guide for Ubuntu 14.04. My app (which is 3.2.X and Ruby 1.9.3) no longer serves the static images I store in public folder. I have several subdirectories of images there (I have a template engine that uses those) and it doesn't make sense to store them in the asset pipeline because they change between deployments.

Any suggestions on nginx conf tweaks to serve up jpg, pngs, gifs and mp4 files from these subdirectories? I get 404's for them now.

Thanks.