Rails application root not working - Rails One-Click droplet
I have been trying to deploy my rails application for a good part of this week now and have tried many, many, many times to try and get this working. I either hit a 502 bad gateway, a 504 gateway timeout or the page simply cannot be reached.
I have done the following already:
- cloned my application from BitBucket into
- changed my DNS records so that my domain points to my droplet IP (using my domain name works for the default "rails_project"
nano /etc/unicorn.confand changed the value to
nano /etc/nginx/sites-enabled/railsand changed the value to
service nginx reload && service unicorn restart
My favicon loads and I see that but the rails application just doesn't load.
My rails app works in production on a free Heroku dyno so I'm confident it's not that
Thank you for any help you can provide, it is greatly appreciated!
nginx -t outputs this:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
This is my error log:
[error] 13744#13744: *19 upstream timed out (110: Connection timed out) while reading response header from upstream, client: [IP Address], server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/run/DigitalOceanOneClick/unicorn.sock/", host: "[My Domain Name]"