Question
Problem With Home page in ruby on Rails
Hi
I had developed a application in ruby on rails and deployed with the help of this link
https://www.digitalocean.com/community/tutorials/how-to-automate-ruby-on-rails-application-deployments-using-capistrano and i have set ruby application correctly ngnix/default.conf file also but when trying to access my application through ip address its showing 404 Not Found in my browser but i have tested with html test page with same path its working fine and this is what my conf files
server {
listen 80;
server_name xxx.xxx.xxx.xxx;
root /home/deployer/app-name/current/app/views/sessions/login.html.erb;
passenger_enabled on;
#charset koi8-r;
access_log /var/log/nginx/alemany.access.log main;
error_log /var/log/nginx/alemany.error.log;
#root /usr/share/nginx/html;
#index index.php index.html index.htm ;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×