I need to increase the client_max_body_size
setting for a single app I have installed on a Dokku Paas. I could edit the nginx configuration globally, but that would be brittle, and I would like this setting to live with the app config where possible.
I have seen some plugins that help rewrite the nginx.conf file (eg. https://github.com/mikexstudios/dokku-nginx-alt), but that seems like overkill when I only want to change a single setting.
I have also noticed the nginx-configure
plugin hook (https://github.com/progrium/dokku/pull/189), but I could not find clear instructions on how to use this from an app (where would I put the hook script, for example?).
What is the cleanest, most maintainable and most portable method of setting a single nginx configuration parameter on a per app basis?
server
andlocation
blocks. Somewhere you have location block, that pass request to you app. You could addclient_max_body_size
directive to that block. – Hannover