Nginx: invalid host in upstream

I’m trying to run a Rails app using Nginx with 5 Thin servers.

I created the thin.yml file and when I run the start command, I get:

[email protected]:/opt/bitnami/projects/ndeavor/current/config$ thin -C

Starting server on …

Starting server on …

Starting server on …

Starting server on …

Starting server on …

I created a ndeavor.conf file in nginx/conf/vhosts that looks like this:

And if I run the command to start Nginx, I get this:

[email protected]:/opt/bitnami$ sudo ./ start nginx
nginx: [emerg] invalid host in upstream "" in


Posted at Nginx Forum:,237358,237358#msg-237358

From: “Reddirt” [email protected]

[email protected]:/opt/bitnami$ sudo ./ start nginx
nginx: [emerg] invalid host in upstream "" in


What is your upstream section of the configuration file? Do you have
“/ndeavor” as part of the server statement? Try taking it off.

Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.

I don’t think that you can use a path behind the server. The Upstream
is a server name itself (with port), not with something like
“/something” at
the end.

Posted at Nginx Forum:,237358,237364#msg-237364

It looks like Bitnami expects the Rails app to be in url/appname. So, I
just removed the /ndeavor from the thin.yml and from nginx.conf.

This is what my thin.yml looks like now:

And this is my nginx.conf:

I’m using Bitnami Rails stack that runs Ubuntu.

I now start the Thin with this: thin -C thin.yml start

And I start Nginx with this: [email protected]:/opt/bitnami$ sudo
start nginx

And they both start OK.

But, when I go to my website url, I get this message “The service is not
available. Please try again later.”

I don’t know where that message is coming from.

Posted at Nginx Forum:,237358,237372#msg-237372

I restarted. Now I’m getting the website without the CSS. I thought
would provide the static webpages including CSS.

How can I tell if Nginx is running properly?

Sorry - This is my first time trying this.

Posted at Nginx Forum:,237358,237373#msg-237373

My Rails app has this in production.rb: config.serve_static_assets =

When I run Thin by itself, I have to make that true.

I thought with Nginx it would stay false.

Posted at Nginx Forum:,237358,237374#msg-237374

OK - we can close this thread. But, I’m going to start a new one
because I
still can’t get to my Rails app.

Posted at Nginx Forum:,237358,237377#msg-237377