We’re running nginx inside our container. Knowing that we’re behind the aptible nginx proxy, I assume many of our traditional settings (such as gzip settings, proxy_buffers, client_body_buffer_size, timeouts, etc…) probably don’t apply.
Could anyone recommend a vanilla nginx.conf that would work well behind the proxy? I need to be able to:
perform the http->https redirects
intercept static requests [I can do this config]
proxy everything else to an internal unicorn [I can do this part].
The main question is all of the other settings. Any suggestions?
I just don’t want the nginx’es to be fighting each other…
Any app-specific server/site configuration goes in conf.d and/or sites-enabled. I think that’s probably a good starting point for matching the important settings from our front-end NGiNX proxies.
While I know the above config works in production for some of our customers, it may still have some settings that aren’t strictly necessary for an app-level NGiNX (you mention a few in your original question like gzip settings, proxy_buffers, client_body_buffer_size). If you find any such settings that you can remove and still get a working app, I’d be interested to hear back so that we could pare this example down when recommending a starting point for app-level NGiNX proxies in the future.