Ubuntu 24.0 Docker - PHP-FPM + NGINX - PHP-FPM gives /index.php 404 error
18:21 18 Feb 2026

I have a docker setup with Laravel Application that works fine on local Mac however, I am facing issues with the deployment on Ubuntu server 24.0.

  1. All my paths are correct

  2. All my volumes are mapped correctly

  3. I checked the file location which exists

  4. I have correctly pointed the root for NGINX i.e. both the NGINX and PHP-FPM has the same folder structure /var/www/api/public

  5. User & Group ID matches the host OS i.e. 1000:1000 in all containers

  6. Permissions:

    1. api: 755

    2. api/storage : 775

    3. api/bootstrap/cache: 775

Where could be the issue?

I have created a git repo for this setup here. The folder structure I have is:

Project Folder
|- docker-laravel
|- api

The log after running docker compose -f docker-compose.yml -f docker-compose.prod.yml logs php

log of docker container

php docker nginx docker-compose