I'm facing to a problem with Azure Wordpress on App Service, the Startup Command is ignored when I perform a restart of App service. I need to copy a custom config file into nginx directory as described in the article Configure Nginx for PHP 8 Linux Azure App Service.
Here is the content of startup.sh script:
#!/bin/bash
cp /home/spec-settings.conf /etc/nginx/conf.d/spec-settings.conf
service nginx restart
Do someone have any idea what might be wrong?
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:
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:
/home/site/startup.sh
Now, For the Startup Command enter
/home/site/startup.sh
, and save the setting and navigate your application.For more in detail, please refer below link:
NGINX Rewrite Rules for Azure App Service Linux PHP 8.x - (azureossd.github.io).