inginx 404 Not Found nginx/1.14.2 error on our admin panel in PHP 8 codeigneter

Ytowait Pvt Ltd 1 Reputation point
2022-09-09T16:15:16.073+00:00

Hello Friends,
We have a Dynamic website with admin panel hosted in webapp with php 8 and mysql. My website front end is up and running, but the admin panel is not opening. Getting inginx 404 Not Found nginx/1.14.2 error.

we have tried below steps almost 20 times, raised tickets , but still no luck. Please help.

Step 1: Use the SSH

Navigate to your App Service via the Azure Portal. Under the Development Tools section, select SSH then Go -->

Step 2: Modifying the default site config:

       You will want to make a copy of the existing configuration and place the file inside the "/home/site" directory.  

          cp /etc/nginx/sites-available/default  /home/site/default  

Step 3: Update default file:

       Once copied, edit the /home/site/default file and update the section below:  

         

   server {  

            

           # Section Excluded  

 

       location /Adminsandy90637359547416415345/ {  

                index  index.php index.html index.htm hostingstart.html;  

               try_files $uri $uri/ /index.php?$args;  

          }  

 

           location / {  

                index  index.php index.html index.htm hostingstart.html;  

               try_files $uri $uri/ /index.php?$args;  

          }  

         # Section Excluded  

      }  

 

Step 4: Creating the custom "startup" script

        You will now need to create a custom startup script and save the file as /home/site/startup.sh  

 

Step 5: Overriding the existing /etc/nginx/sites-available/default file with the /home/site/default file. And then Reloading the NGINX service to make the updates take effect.

 #!/bin/bash  

 cp /home/site/default /etc/nginx/sites-available/default  

 service nginx reload  

Step 6: Updating the application settings

Navigate back to your App Service via the Azure Portal. Under the "Settings" section, select "Configuration".
Go over to the "General Settings" section of the Configuration blade.
For the "Startup Command" enter the following: /home/site/startup.sh

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,865 questions
{count} votes