I am new to nginx and passenger and want to use it to run a rails application.
I have installed nginx and passenger on my mac (passenger-install-nginx-module
).
I can start the nginx server and see the default nginx welcome screen.
I want to run a rails app on my nginx server.
I have added the following to the nginx.conf:
server {
listen 8080;
server_name localhost;
root /myrailsApp/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
When I start my nginx server and navigate to localhost:8080 I see the message:
"No data received" (Error code: ERR_EMPTY_RESPONSE)
I am guessing this is a silly mistake that I have overlooked? Could someone please point me in the right direction?
Bit more information that may help.
which ruby returns:
/Users/user/.rvm/rubies/ruby-1.9.3-p429/bin/ruby
I installed using:
gem install passenger
passenger-config --root returns:
/Users/user/.rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/passenger-4.0.20
Is this (@rails3tutorial2ndEd/gems/passenger-4.0.20
) not a little strange ?
I then ran the passenger nginx installer:
passenger-install-nginx-module
As I said, I can start nginx with no problems. I added the new server block to the nginx.conf file pointing to my rails public folder but the page returns
"No data received"