title: rails - nginx + puma - static assets not being served by nginx from the tutorial link provided
body: <p>I am using Ubuntu. 
  Here is the <a href="http://ruby-journal.com/how-to-setup-rails-app-with-puma-and-nginx/" rel="noreferrer">tutorial</a></p>
  
  <p>Nginx config I am using:  </p>
  
  <pre><code>upstream my_app {
  server unix:///home/uname/railsproject/my_app.sock;
  }
  
  server {
  listen 88; #(I used exact 88 when I am testing now)
  server_name localhost; # I used exact localhost when I am testing this
  root /home/uname/railsproject/public; # I assume your app is located at that location
  
  location / {
   proxy_pass http://my_app; # match the name of upstream directive which is defined above
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
  
  location ~* ^/assets/ {
   # Per RFC2616 - 1 year maximum expiry
   expires 1y;
   add_header Cache-Control public;
  
   # Some browsers still send conditional-GET requests if there's a
   # Last-Modified header or an ETag header even if they haven't
   # reached the expiry date sent in the Expires header.
   add_header Last-Modified "";
   add_header ETag "";
   break;
   }
  </code></pre>
  
  <p>}</p>
  
  <p>Puma command</p>
  
  <pre><code>RAILS_ENV=production puma -e production  -b unix:///home/uname/railsproject/my_app.sock -p 8000
  </code></pre>
  
  <p>In the address bar, I am typing </p>
  
  <pre><code>http://localhost/ 
  </code></pre>
  
  <p>and then website opening but static assets not working. Of course, I ran</p>
  
  <pre><code>RAILS_ENV=production rake assets:precompile
  </code></pre>
  
  <p>and assets are available in public/assets folder<br>
  I also tried placing <code>m.txt</code> file in assets directory and accessing     </p>
  
  <pre><code>http://localhost/assets/m.txt    
  </code></pre>
  
  <p>but didn't work. I also tried this command: </p>
  
  <pre><code>sudo chown -R www-data:www-data public/
  </code></pre>
  
  <p>but this didn't help.  </p>