the try_files directive falls back to the @upstream if it exists, otherwise to =404 (instead of both, which is invalid)
a new direct_proxy variable is introduced. When it is set to the name of an upstream, it causes ALL requests to be proxied to that upstream (so there is no try_files directive). This is preferable to try_files when the upstream is meant to handle all requests (for example, when proxying to an Apache server that handles its own static files).
In the process I moved some proxy configuration to /etc/nginx.conf.d/common_proxy.conf to reduce clutter.
(Nick, I know you're currently working on a revamp of this role. I'm mostly posting this for anybody else who is using this role, and to give you ideas while you work on the new version.)
Thanks a lot for this. I will hold off on merging this one, and the revamp is still quite a ways off, so it's definitely valuable to keep this around for others.
This pull request aims to fix Issue #13:
direct_proxy
variable is introduced. When it is set to the name of an upstream, it causes ALL requests to be proxied to that upstream (so there is notry_files
directive). This is preferable totry_files
when the upstream is meant to handle all requests (for example, when proxying to an Apache server that handles its own static files).In the process I moved some proxy configuration to
/etc/nginx.conf.d/common_proxy.conf
to reduce clutter.(Nick, I know you're currently working on a revamp of this role. I'm mostly posting this for anybody else who is using this role, and to give you ideas while you work on the new version.)