How do I push changes to the nginx.conf file from Visual Studio to a Ubuntu-based production server via Azure DevOps and Git?

Randall Powell 1 Reputation point
2022-01-18T18:43:53.627+00:00

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.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,415 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,643 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2022-01-19T20:14:53.317+00:00

    The product group for Azure DevOps / TFS actively monitors questions over at
    https://developercommunity.visualstudio.com/report?space=21&entry=problem
    https://developercommunity.visualstudio.com/report?space=22&entry=problem

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments