NGINX + Passenger 404 143 error
<p>My project is at: tenklakes.northcentralus.cloudapp.azure.com/
It is routing correctly to the root defined in my routes file, but if I try to go to /lakeaddresses I receive an NGINX 404 error and it is not even making it to my ruby project. I'm very confused as my error.log file doesn't show an error for the /lakeaddresses request, however it is evident in the access.log file that there was a GET request, and it is just returning a 404.</p>

<p>Is there somewhere I should be looking to remedy this?</p>

<p>/var/log/nginx/access.log</p>

<pre><code>xxx.xx.xx.xxx - - [14/Nov/2016:22:18:39 +0000] "GET /lakeaddresses HTTP/1.1" 404 143 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0"
</code></pre>

<p>/etc/nginx/nginx.conf</p>

<pre><code>http {
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;
    gzip on;
    gzip_disable "msie6";

    include /etc/nginx/passenger.conf;
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}
</code></pre>

<p>/etc/nginx/passenger.conf</p>

<pre><code>passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/passenger_free_ruby;
</code></pre>

<p>/etc/nginx/sites-available/default</p>

<pre><code>server {
    listen 80;
    server_name tenklakes.northcentralus.cloudapp.azure.com;
    #passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
    passenger_enabled on;
    passenger_app_env production;
    root /home/garrett/lakemag/public;
</code></pre>

<p>/var/log/nginx/error.log</p>

<pre><code>[ 2016-11-14 22:04:26.4994 39317/7f6fa3a9b700 age/Ust/UstRouterMain.cpp:422 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2016-11-14 22:04:26.4995 39317/7f6fa9a6d7c0 age/Ust/UstRouterMain.cpp:492 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2016-11-14 22:04:26.4995 39317/7f6fa3a9b700 Ser/Server.h:464 ]: [UstRouter] Shutdown finished
[ 2016-11-14 22:04:26.4995 39317/7f6fa329a700 Ser/Server.h:817 ]: [UstRouterApiServer] Freed 0 spare client objects
[ 2016-11-14 22:04:26.4995 39317/7f6fa329a700 Ser/Server.h:464 ]: [UstRouterApiServer] Shutdown finished
[ 2016-11-14 22:04:26.4997 39317/7f6fa9a6d7c0 age/Ust/UstRouterMain.cpp:523 ]: Passenger UstRouter shutdown finished
[ 2016-11-14 22:04:26.5033 39364/7f8d0dcb07c0 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
[ 2016-11-14 22:04:26.5034 39364/7f8d0dcb07c0 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
[ 2016-11-14 22:04:26.5048 39364/7f8d0dcb07c0 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 39364
[ 2016-11-14 22:04:26.5094 39370/7fdc4e25b7c0 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2016-11-14 22:04:26.5099 39370/7fdc4e25b7c0 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 39370
[ 2016-11-14 22:04:26.5196 39312/7f7b15ff27c0 age/Cor/CoreMain.cpp:967 ]: Passenger core shutdown finished
App 39797 stdout: 
App 39885 stdout: 
</code></pre>

<p>/lakemag/log/production.log</p>

<pre><code>I, [2016-11-15T14:32:00.454994 #39885]  INFO -- : [791e0467-658b-4311-8a93-3fd90d1f9a4b] Started GET "/" for 173.25.246.47 at 2016-11-15 14:32:00 +0000
I, [2016-11-15T14:32:00.458445 #39885]  INFO -- : [791e0467-658b-4311-8a93-3fd90d1f9a4b] Processing by MapController#index as HTML
I, [2016-11-15T14:32:00.459087 #39885]  INFO -- : [791e0467-658b-4311-8a93-3fd90d1f9a4b]   Rendering map/index.html.erb within layouts/application
I, [2016-11-15T14:32:00.459226 #39885]  INFO -- : [791e0467-658b-4311-8a93-3fd90d1f9a4b]   Rendered map/index.html.erb within layouts/application (0.0ms)
I, [2016-11-15T14:32:00.459888 #39885]  INFO -- : [791e0467-658b-4311-8a93-3fd90d1f9a4b] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
</code></pre>

<p>routes.rb</p>

<pre><code>Rails.application.routes.draw do

get '/lakeaddresses' =&gt; 'lakeaddresses#index'
root 'map#index'
end
</code></pre>