as you can see from the link
https://stackoverflow.com/questions/63126908/modifying-nginx-conf-for-azure-app-linux-service
In Azure App Service, there are two perspectives on modifying the Nginx configuration via SSH or another terminal
You can potentially modify your Nginx configuration via the startup command of your app service. The steps to do this are:
- SSH into your app service :)
- Copy over the default Nginx configuration file to your home directory
cp /etc/nginx/sites-available/default /home/site/nginx.conf.
- Modify the copied-over Nginx configuration file at /home/site/nginx.conf
- Create a bash file /home/site/startup.sh with the following contents:
cp /home/site/nginx.conf /etc/nginx/sites-available/default
service nginx reload
Set your app service startup command to /home/site/startup.sh.
During startup, your app service will overwrite the default Nginx configuration and reload the Nginx service. While this method works, it is not the most maintainable solution.
There are limitations within the Azure sandbox. You can't modify the nginx.conf as you're inside a Microsoft docker container. Any files or directories outside of the /home directory will not persist between site recycles. As such, you might not have access to change certain settings since they are locked down under the Azure sandbox.