I currently have 2 Rails apps (using different Ruby versions) being served by nginx & Passenger Standalone via reverse proxy on my development machine. One of the apps is now redundant and I thought it might be better to move to the normal Passenger + nginx configuration rather than via Standalone and reverse proxy.
To be on the safe side I then went through the process defined here :
All of those step give the right results.
I then moved on to the next tutorial here :
Since I already had my app working I simply moved to Step 3 Configuring Passenger and nginx.
The passenger ruby command gave me the following:
passenger_ruby /home/purvez/.rvm/gems/ruby-1.9.3-p0/wrappers/ruby
I then created gi.conf file as described but included some extra stuff to handle some php as well. I'm attaching that file.
I then restarted nginx.
Within the public directory of gi I have a very simple index.html which simply has an <h1>GI Site</h1>.
Now if I go to gi that index.html gets served up.
However if I go to gi/start where start is a controller within my Rails app then I get a 500.html.
Here are the last few entries from the nginx error.log :
[ 2017-05-09 12:24:34.2104 19165/7f5bbbd8b780 age/Cor/CoreMain.cpp:1055 ]: Passenger core shutdown finished
2017/05/09 12:24:35 [info] 21385#21385: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:76
[ 2017-05-09 12:24:35.2920 21392/7f5f22208780 age/Wat/WatchdogMain.cpp:1281 ]: Starting Passenger watchdog...
[ 2017-05-09 12:24:35.3014 21395/7fc72c154780 age/Cor/CoreMain.cpp:1070 ]: Starting Passenger core...
[ 2017-05-09 12:24:35.3015 21395/7fc72c154780 age/Cor/CoreMain.cpp:245 ]: Passenger core running in multi-application mode.
[ 2017-05-09 12:24:35.3052 21395/7fc72c154780 age/Cor/CoreMain.cpp:820 ]: Passenger core online, PID 21395
[ 2017-05-09 12:24:35.3151 21405/7f78c0079780 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2017-05-09 12:24:35.3157 21405/7f78c0079780 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 21405
[ 2017-05-09 12:24:37.6087 21395/7fc725d78700 age/Cor/SecurityUpdateChecker.h:356 ]: Security update check: no update found (next check in 24 hours)
App 21430 stdout:
App 21674 stdout:
App 21430 stderr: cache: [GET /start] miss
App 21430 stderr: cache: [GET /start] miss
12:24 is around when I issued a sudo service nginx restart command.
Here are the relevant entries from the nginx access log:
127.0.0.1 - - [09/May/2017:12:24:08 +0100] "GET /start HTTP/1.1" 502 173 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0"
127.0.0.1 - - [09/May/2017:12:24:09 +0100] "GET /start HTTP/1.1" 502 173 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0"
127.0.0.1 - - [09/May/2017:12:24:43 +0100] "GET /start HTTP/1.1" 500 643 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0"
127.0.0.1 - - [09/May/2017:12:30:49 +0100] "GET /start HTTP/1.1" 500 643 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0"
So it looks like passenger is running but is not serving up my app.
The only other bit of info I have is the following entries within passenger.conf.
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/passenger_free_ruby;
Please can someone tell me what I'm doing wrong here.
All advice gratefully received with thanks.