0

I am trying to make a shell script to auto install a web app and the script needs to set client_max_body_size to a bigger size, at some point.

Of course, it's possible to set this directive using nano but this is not what I am looking for. The script should be able to se the value for this directive in http section by itself.


The script needs to set mentioned directive in /etc/nginx/nginx.conf.

I have got this example in nginx docs, but I don't know how to modify this to my use-case:

nginx -g "pid /var/run/nginx.pid; worker_processes sysctl -n hw.ncpu;"

1 Answers1

3

In many distributions, there is a include conf.d/*.conf line in nginx.conf http section.

So, the script can create a file in conf.d directory with .conf extension and the reload nginx configuration.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63