ngnix not serving assets of my rails application - ruby-on-rails

I'm running a rails app in prodction with nginx an apache2.
The application starts properly, but the assets were not served by nginx. The Assets are under public/assets available.
But nginx says 404 Not Found.
any ideas how to solve this issue?
its a debian server with plesk17
Apache config looks like this:

restarting server and resassign ssl certificate solves my problem

Related

How to Deploy rails application using apache2 and apache tomcat server

Hi I am new to ruby on rails and I want to deploy my rails app using web server apache2 and application server tomcat and jruby.I have installed tomcat 8.0.36 and apache2.My application runs on tomcat server IP_ADDRESS:8080.
apache2 folders:
apache2.conf conf-enabled magic mods-enabled sites-available
conf-available envvars mods-available ports.conf sites-enabled
Please suggest me how to connect both these server and deploy.If my idea is wrong then suggest me what are the best way to deploy rails app.
You could deploy using this link
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04

Apache 2.18 denied Rails app (with Apache & Passenger)

I have a server (ubuntu) which runs some Rails app with Apache & Phusion Passenger.
Every Rails app stopped to work since I upgraded Apache to 2.18.
The server always respond with a 403 status (forbidden) but the public/ directory is not private (I can access via http any .html, .jpg, etc... inside it).
In error.log from Apache there are some entries like:
No matching DirectoryIndex (none) found, and server-generated directory index forbidden by Options directive
Anyone has any idea?
UPDATE:
I managed to solve this issue reinstalling (purge than install) Apache 2.4 and Passenger (and all its dependencies). Running ok with Apache 2.4.18 and Passenger 5.

Production server using an outdated release of capistrano

I deploy new version via capistrano to a Ubuntu 14.04 server and now Unicorn + Nginx setup is referring to inexistent release. I get the ActionView::MissingTemplate and also a I18n::InvalidLocaleData because it failed to load the devise.en.yml file.
I pretty much followed this repo. I already restart nginx and unicorn but still gives me the same error. It's searching on a release/release_timestamp that no longer exists
You can at least confirm that Nginx is not part of the problem by directly connecting to the port or socket that Unicorn is listening on from within the server.
If Unicorn is running on a socket, see Can Curl send requests to sockets?.

Do I need to restart NginX after reconfigure for passenger to work

I just updated my NginX configuration.
In the config I've added a new server with a different environment for a rails application.
I've reloaded the configuration (sbin/nginx -s reload) and deployed the application to the right folder but nothing seems to happen, NginX throws 404 not found..
Is there anything more I need to do?
Do I need to restart NginX or passenger for example?
Turns out you don't need to restart.
Passenger isn't able to restart (as far as I've found out) and NginX only needs a reload.

Rails framework & Nginx web server

As we install rails it uses its own web server WEBrick. If i want to run ths application in Nginx server, then how to configure or set the Nginx web werver?
You should run your rails application in a production server such as mongrel_cluster or thin (I have used the former, and am currently switching to the latter). To put nginx in front of it, I would use the upstream and proxy_pass directives. I found a nice blog post comparing ways of running rails applications that shows their config for mongrel_cluster + nginx.
Passenger is also available for nginx, I've used that with Apache and it was very easy to set up.

Resources