Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having problems with my Rails application that will use Nginx and Passenger. I've already deployed the application and have setup the nginx config file as such:

server {
   listen 80;
   root /home/johndoe/test_app/current/public;
   passenger_enabled on;

I've already set up the name servers of the domain and added the entry on my provider. However, all I'm seeing is the Welcome to Nginx page. I've checked the nginx error log and I just saw this, not sure what it means and why it's searching for that file.

[error] 8492#0: *7 open() "/opt/nginx/html/favicon.ico" failed (2: No such file or directory)

Any help would be very much appreciated. Thanks.

share|improve this question

closed as off-topic by kasperd, Ward, womble May 2 at 7:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

You're reloaded/restarted nginx, right? And your server block is being included when nginx reads the configuration files (i.e., the site is enabled with a symlink on Ubuntu systems)? – cjc Aug 9 '12 at 19:28
Yes, I've restarted nginx multiple times. I'm not sure if the server block is being included for certain though, is there a way I can check? – mumble Aug 9 '12 at 19:31

Turns out I have to define it in a separate server block. Worked great. Found the answer here:

share|improve this answer

That error means your site doesn't have a favicon.ico file for showing a favicon. If you don't want a favicon, you can safely ignore it.

share|improve this answer
I don't quite understand why it goes to /opt/nginx/html/favicon.ico. Is it looking for the index page there? I've already set a root location for the server name in the server block. Am i missing something? – mumble Aug 9 '12 at 19:17
It's probably coming in for a different server block, perhaps the default server. – Michael Hampton Aug 9 '12 at 19:18
But I only have 1 server block. – mumble Aug 9 '12 at 19:33

Verify following configuration should be comment out in nginx.conf

sudo gedit /opt/nginx/conf/nginx.conf

    # location / {
    #     root   html;
    #     index  index.html index.htm;
    # }

This fix your problem of "Rails application only showing Nginx default page"

share|improve this answer

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