How do I resolve 403 Forbidden for nginx + passenger + rails + centos 7 setup
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:
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
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.×