Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jan 27, 2011 1:33 pm 
Offline

Joined: Thu Jan 27, 2011 1:26 pm
Posts: 1
I asked this over at stackoverflow and serverfault as well, but still haven't received any answers that have helped me to solve this problem. I have spent about 2 weeks at this point trying to solve the issue, and I'm just not making any headway. It seems that this issue is pretty common, but none of the solutions I found online work for me. A buddy of mine is actually creating the same setup, and he is having the same issue.

After a few days stuck with the 403 error I started over using this tutorial: http://blog.ninjahideout.com/posts/a-gu ... rvm-server

I had hoped starting from scratch using this tutorial would work, but no dice. Either way, if you view the tutorial you can see what steps I have taken.

Here is essentially what I have going on.

1. I have a VPS account on linode.com
2. Server OS is Ubuntu 10.04
3. Local OS (shouldn't matter, but just so you know) used to deploy with Capistrano is Snow Leopard 10.6.6
4. I use RVM on the server. Version is 1.2.2
5. I was previously on ruby-1.9.2-p0 [ i386 ], but per the tutorial listed above I switched to ree-1.8.7-2010.02 [ i386 ].
6. Running 'which ruby' from the command line verifies that I am using 1.8.7 with the following output: /usr/local/rvm/rubies/ree-1.8.7-2010.02/bin/ruby
7. passenger -v prints the following: Phusion Passenger version 3.0.2
8. Running 'nginx -v' gives me a message that the command nginx could not be found. The server is definitely there and running as I can use nginx to serve static files, but this could have something to do with my problem.
9. I have two users dealing with the install. root which I used to install everything, and deployer which is a user I created specifically to for deploying my applications
10. My web app directory is in the deployer user's home directory as follows: /home/deployer/webapps/mysite.com/public
11. Per Capistrano default deploy, a symbolic link called current is created in the public folder, and points to /home/deployer/webapps/mysite.com/public/releases/most_current_release
12. I have chmodded the deployer directory recursively to 777
13. /opt/nginx permissions: rwxr-xr-x
14. /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/passenger-3.0.2 permissions: rwxrwsrwx
15. My nginx config file has gone through just short of eternity variations, but currently looks like this:

Code:

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    passenger_root /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/passenger-3.0.2;
    passenger_ruby /usr/local/rvm/bin/passenger_ruby;

    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    server {
       # listen      *:80;
        server_name mysite.com www.mysite.com;
        root   /home/deployer/webapps/mysite.com/public/current;

        passenger_enabled on;
        passenger_friendly_error_pages on;


        access_log logs/mysite.com/server.log;
        error_log logs/mysite.com/error.log info;

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}



I bounce nginx, hit the site, and boom. 403, and logs say directory index of /home/deployer... is forbidden

As others with a similar problem have said, you can drop an index.html into the public/releases/current_release and it will render. But rails no worky.

That's basically it. At this point I have just about completely exhausted every possible solution attempt I can think of. I am a programmer and definitely not a sysadmin, so I am 99% sure this has something to do with permissions that I have hosed, but for the life of me I just can't figure out where.

If anyone can help I would really really appreciate it. If there's any specific permission things you want me to check (ie groups/permissions), can you please include the commands to do so as well. Hopefully this will help others in the future who read this post.

Let me know if there is any other information I can provide, and thanks in advance!!!

Also, here are the links to my posts on serverfault and stackoverflow:

http://serverfault.com/questions/226273 ... senger-403

http://stackoverflow.com/questions/4761 ... senger-403


Top
   
 Post subject: Same issue
PostPosted: Thu Feb 03, 2011 6:08 am 
Offline

Joined: Thu Feb 03, 2011 6:07 am
Posts: 1
Location: US
I'm having the same exact issue and it's killing me. Just blew 8 hours troubleshooting.


Top
   
 Post subject:
PostPosted: Thu Feb 03, 2011 6:46 am 
Offline
Newbie

Joined: Thu Feb 03, 2011 6:28 am
Posts: 2
Website: http://xentek.net
Location: Chicago
A couple things I'd double check:

* Is your deployer user in the rvm group?
* Can the deployer user run ruby from the command line? Is it the right ruby?
* Is the right ruby in your $PATH? (http://www.modrails.com/documentation/U ... stallation)

_________________
~ Eric Marden


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group