To resolve the problem "Azure Linux Startup Command ignored" try below workarounds:
Workaround1:
To copy a custom config file into nginx directory use custom startup script.
According to the documentation you are following, you need to give the below command in startup command field:
cp /home/default /etc/nginx/sites-enabled/default; service nginx restart
Save the setting after changing the Startup Command. This makes the App service to restart.
Workaround2:
If you dont want to give startup command in that field, leave the existing value you entered and try below:
- Create a custom script as below and save it as
/home/site/startup.sh
cp /home/site/default /etc/nginx/sites-available/default
service nginx restart
Now, For the Startup Command enter /home/site/startup.sh
, and save the setting and navigate your application.
- If the above workarounds doesn't work, try using reload instead of restart.
cp /home/spec-settings.conf /etc/nginx/conf.d/spec-settings.conf
service nginx reload
For more in detail, please refer below link:
NGINX Rewrite Rules for Azure App Service Linux PHP 8.x - (azureossd.github.io).