Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Up until this point I've been using the standalone passenger (nginx-based) for my application. Everything works fine.

I've decided to move to an nginx based solution since I need to be able to support multiple sites.

I've followed the usual guides, using the passenger nginx installation and everything works fine.

I've configured my nginx as follows:

server {
    listen 80;
    server_name www.mydomain.com;
    root /www/myproject/public;
    passenger_enabled on;
}

The server starts up as expected but every time www.mydomain.com is accessed, the server returns a 500.

It seems like things are starting as expected because I had at one point forgotten to start the mongo daemon and got a passenger error showing that it couldn't connect to the mongo server. So at least it's running SOMETHING. Once I turned on the daemon, it went back to throwing 500s.

I've checked the logs, I get nothing in my logs/production.log. Nginx has nothing in the error.log and access.log has this:

xxx.xxx.xxx.xxx - - [22/Feb/2012:11:14:51 -0500] "GET / HTTP/1.1" 500 643 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20110412 CentOS/3.6.9-2.el6.centos Firefox/3.6.9"

My mongo logs are spitting out the usual stuff:

Wed Feb 22 11:14:44 [initandlisten] connection accepted from 127.0.0.1:47013 #1
Wed Feb 22 11:14:44 [conn1] end connection 127.0.0.1:47013
Wed Feb 22 11:14:44 [initandlisten] connection accepted from 127.0.0.1:47015 #2
Wed Feb 22 11:14:44 [conn2] end connection 127.0.0.1:47015
Wed Feb 22 11:14:51 [initandlisten] connection accepted from 127.0.0.1:47017 #3
Wed Feb 22 11:14:51 [initandlisten] connection accepted from 127.0.0.1:47019 #4
Wed Feb 22 11:14:51 [conn4] end connection 127.0.0.1:47019
Wed Feb 22 11:14:51 [initandlisten] connection accepted from 127.0.0.1:47021 #5
Wed Feb 22 11:14:51 [conn5] end connection 127.0.0.1:47021
Wed Feb 22 11:14:51 [initandlisten] connection accepted from 127.0.0.1:47023 #6

I'm really not much of a sysadmin (as you can probably tell) so any suggestions are welcome. If I left out any information, please tell me.

Thanks so much,

Ian

EDIT

Issue has been fixed thanks to robotrobert's suggestion - I tried to rails server and found out that there was a bundler issue. Once fixing that, it still didn't work. However, setting the environment to production fixed that.

Thanks!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

For me it seems that rails doesn't do/render anything for the request.

For start try add the following to server scope:

rails_env production;

If it's not working you could try running your app with default webrick server, and check what it is rendering on <yourdomain>:3000

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.