Answer the question
In order to leave comments, you need to log in
First time running RoR test app on ubuntu + Passenger + nginx?
Windows machine is running Oracle Vm in which ubuntu server 14 x64 sits. Set up ssh, installed rvm, ruby, rails, bundle, nodejs. Created a test RoR application in ~/test_app. Installed gems for test application. rails s - starts.
Next, I set up the nginx + passenger bundle.
So I used the instruction: https://www.phusionpassenger.com/library/walkthrou...
in windows on the locale in the browser I enter the ip of the virtual machine I see: Welcome to nginx on ubuntu. How to see the test application?
passenger-config about ruby-command
passenger-config was invoked through the following Ruby interpreter:
Command: /home/brainy_code/.rvm/gems/ruby-2.1.5/wrappers/ruby
Version: ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
To use in Apache: PassengerRuby /home/brainy_code/.rvm/gems/ruby-2.1.5/wrappers
To use in Nginx : passenger_ruby /home/brainy_code/.rvm/gems/ruby-2.1.5/wrapper
To use with Standalone: /home/brainy_code/.rvm/gems/ruby-2.1.5/wrappers/ruby /hm/gems/ruby-2.1.5/gems/passenger-5.0.15/bin/passenger start
sudo nano /etc/nginx/sites-enabled/test_app.conf:
server {
listen 80;
server_name yourserver.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root ~/test_app/public;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /home/brainy_code/.rvm/gems/ruby-2.1.5/wrapper;
}
sudo service nginx restart
ok
Answer the question
In order to leave comments, you need to log in
And let's bet what you did according to the wrong instruction, or rather according to it, but with free steps to the left and right? :)
not the right question, the right question is "why does nginx look for indexhtml in /usr/share/nginx/~/test_app/public/ and not in the public directory of the project" ;)
and even by the way, they forgot to mention in the instructions that in order for nginx to give you what you want access the address yourserver.com
or assign the virtual host as default.
Well, or you can register yourserver.com
in the hosts of your OS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question