I have a DotNet Core v3.1 project running in production on a Ubuntu-based server with NGINX as its web server. I am using Visual Studio 2019 Community on Windows 11 Home for development. The ops business process is as follows: (1) Code changes are made in MS Visual Studio. (2) Code changes are pushed via Azure DevOps to a GitHub repo for staging. (3) A script is run on the production server to pull changes from Git and push them to the app's Docker container.
PROBLEM: In production, the NGINX error message "413 Request Entity Too Large" is being thrown any time an attempt is made to upload a file larger than 1MB in size. Note this is the default behavior for NGINX. In researching the error message I have discovered it will be necessary to modify the nginx.conf file in order to add a directive which will allow larger files to be uploaded.
My first attempt was to simply modify the nginx.conf locally and push the modified file through the Azure DevOps/Git pipeline. However, when attempting to push the modified nginx.conf file from Git to the app's Docker container on the production server the upload failed.
I have verified that my local copy of the project matches exactly with that of the production server, including the nginx.conf and associated Docker files.
If simply modifying the nginx.conf file is insufficient then what else needs to be included in the way of modifications to the project? Do the Docker files also need to be modified?
Any assistance is greatly appreciated.