@Nuno Vicente Thanks for reaching here! If I have understood right you want to create your own customized Nginx configuration based on the default one. Please double check on the below steps to be followed.
- Copy the default Nginx configuration file located at
/etc/nginx/sites-enabled/default
to the/home
folder. - Since
/home
files are persisted in Azure Storage, ensure that your custom Nginx configuration file is saved under/home
to survive restarts and be shared across instances. - Access the App Service WEBSSH via
https://<AppServiceName>.scm.azurewebsites.net/webssh/host
. - Modify the Nginx configuration by making changes to the
/home/default
file. - Use a custom startup script to overwrite the original Nginx configuration file, allowing the platform to use your customized configuration each time the App Service starts.
- In the App Service Portal, navigate to "Configuration" -> "General settings" and add the following command in the "Startup Command" field and save the setting.
cp /home/default /etc/nginx/sites-enabled/default; service
.
For more details- see- Configure Nginx for PHP 8 Linux Azure App Service