I am trying to set up a production server and am having a little bit of trouble. I am hoping someone can help me. I am new to Nginx. I usually use Apache for setting up my rails servers but decided I wanted some experience with Nginx.
I followed the tutorial located below for setting up my server: http://karolgalanciak.com/blog/2013/07/19/centos-6-4-server-setup-with-ruby-on-rails-nginx-and-postgresql/
Once I was done with this tutorial, I attempted to hit my sample application with a browser and got the 403 error. When I checked the error log I get the following:
2015/04/07 09:59:37 [error] 30642#0: *1 open() “/apps/my_app/public/tasks” failed (2: No such file or directory), client: ##.##.###.##, server: www.lovell.direct, request: “GET /tasks HTTP/1.1”, host: “www.lovell.direct”
I installed lynx to see if I could hit it via a browser without having to hit the web but I then get a 404 error where the error log says the same thing but the host is localhost instead of the domain address.
I saw in some of the questions that the answer was making sure I had a default route which I do. And also to make the files executable which I didn’t understand that. I am not sure why I would need to make my views executable (if I understood correctly).
I am looking to see what might be going on wrong.
Here is what my nginx.conf file look like
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!