How to modify nginx settings

西蓮淨苑 1 Reputation point
2022-11-03T03:47:57.067+00:00

After the php version was upgraded to 8.1, the permalink of my wordpress website can only be set to the default value, otherwise the pages are all 404 excluding homepage.
An answer at
https://blog.xuite.net/sphjlc062218/thinking/312771190
He taught we can modify nginx settings, so where can I set it?

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

2 answers

Sort by: Most helpful
  1. Manu Philip 16,971 Reputation points MVP
    2022-11-03T04:29:55.063+00:00

    You may SSH to the webapp instance and change as needed. From azure portal, you can access the ssh from your webapp blade as follows. Select GO to open the browser based SSH window

    256634-image.png

    256566-image.png

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--


  2. ajkuma 22,401 Reputation points Microsoft Employee
    2022-11-04T11:18:53.7+00:00

    @西蓮淨苑 , Firstly, apologies for the inconvenience with this issue.

    As I understand, you were able to solve the issue by creating a WordPress WebApp directly on Azure WebApp, but the old site did not work upon upgrading.

    As you rightly examined, it could well be an issue with the configuration issue with the old site, switching to 8.1.

    If you haven’t tried this already, for the other site - you could create a custom script to overriding the existing /etc/nginx/sites-available/default file/- setup a custom startup script and modify the existing NGINX site configuration.

    As outlined in this document : NGINX Rewrite Rules for Azure App Service Linux PHP 8.x

        server {  
          
            # Section Excluded  
          
            location / {  
                index  index.php index.html index.htm hostingstart.html;  
                try_files $uri $uri/ /index.php?$args;  
            }  
          
            # Section Excluded  
        }  
    

    If you still have more questions on this, please let us know, we would be more than happy to assist you further.

    0 comments No comments