@西蓮淨苑 , 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.