I am answering this question for future users as i spent apprx 7-8 hours in fixing it.
I took help from schaako.de , cristopher and azureossd and writing it here.
Open SSH
Navigate to your App Service
via the Azure Portal
. Under the Development Tools section
, select SSH
.
Default site config
copy of the existing configuration and place the file inside the /home/site
directory using this commands
cp /etc/nginx/sites-available/default /home/site/default
Now edit the /home/site/default
file and update as described in laravel documentation Server Configuration settings
location / {
index index.php index.html index.htm hostingstart.html;
try_files $uri $uri/ /index.php?$query_string;
}
custom startup script
You will now need to create a custom startup script and save the file as /home/site/startupscriptbymoon.sh
Add following commands in above file
cp /home/site/default /etc/nginx/sites-available/default
service nginx reload
Startup Command and Test
Now navigate back to your App Service
via the Azure Portal
. Under the Settings section
, select Configuration
and then General Settings
.
In Startup Command
text box enter the following:
/home/site/startupscriptbymoon.sh
navigate back to your application and reload.
enjoy!