Azure App Service PHP 8.5 Runtime missing sites-enabled directory

Ais4Drew 0 Reputation points
2026-08-03T19:51:58.34+00:00

Hello!

I have recently migrated my App Service from PHP 7 to PHP 8 and am following this guide to migrate from .htaccess to Nginx config: https://techcommunity.microsoft.com/blog/appsonazureblog/configure-nginx-for-php-8-linux-azure-app-service/3069373

Specifically I need to be able to handle 404 requests and redirect to a specific PHP file for error handling -- so the built in error page config area within App Service sadly will not work.

When I SSH into my App Service instance the Nginx folder does not have the /sites-enabled directory. I imagine this is a config/image issue and am looking for either my App Service image to be updated or an alternative way to allow for custom error pages -- specifically 404 errors.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.