ryandotsmith / nginx-buildpack

Run NGINX in front of your app server on Heroku
457 stars 248 forks source link

Nginx isn't able to respond to requests. #40

Open jakemauer opened 9 years ago

jakemauer commented 9 years ago

Hey Ryan,

I realize this may or may not be a buildpack issue but I figured I'd start here and at least get some ideas on how to debug it.

We have a Rails 4 app on Heroku that consists of several engines and a wrapper Rails app. If I remove the heroku_12factor gem and change serve_static_assets = false in production.rb, nothing in the public folder will load. I simply get a Heroku level 404. My assumption, which could definitely be wrong, is that if we're using Nginx we should turn off serving of static assets at the Rails level.

EDIT: I also forgot to mention I've setup our Unicorn config and Procfile to match the readme.

Our buildpacks file looks like:

https://github.com/ryandotsmith/nginx-buildpack.git#v0.6
https://github.com/heroku/heroku-buildpack-ruby.git

We're using https://github.com/ddollar/heroku-buildpack-multi.git as our Heroku buildpack config var.

I'm not sure if my meager logs are helpful. As an example I've got

2014-09-30T22:33:01.214157+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=staging.allovue.com request_id=59481393-53e6-4520-8bbe-12d9f7b4bf4c fwd="71.198.140.98" dyno=web.1 connect=0ms service=9ms status=404 bytes=1651

2014-09-30T22:33:02.063708+00:00 app[web.1]: measure#nginx.service=0.009 request_id=59481393-53e6-4520-8bbe-12d9f7b4bf4c

I've tried changing tagged versions of the buildpack, setting up a nginx.conf.erb with a defined root under system, and animal sacrifice. So far none have worked.

Thanks for your time creating and maintaining this buildpack. Any advice you've got is appreciated.