How to redirect to application folder?

1

I use ROR with Nginx .

How can I do what nginx redirects to the application folder? Instead of the /public folder.

    
asked by anonymous 04.04.2014 / 16:29

1 answer

1

Look at this file nginx.conf I used in production: link

location /images/ {
  root /var/www/shared/images;

  rewrite  ^/images/(.*)\.(.*)$  /$subdomain/$1.$2  break;
  rewrite  ^/images/(.*)\.(.*)$  /$subdomain/images/$1.$2  break;
  rewrite  ^/images/(.*)\.(.*)$  /$subdomain/images/original/$1.$2  break;

  # retornar arquivo específico quando nenhuma correspondência
  #error_page   404          /404.html;

  # retornar apenas
  return   403;
}
    
04.04.2014 / 18:49