Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Static files 404 in App Engine Flexible after upgrade

I've upgraded a working project from PHP 7.4 to 8.3 as it was EoL.  

The upgrade works locally and runs on deployment, but all of the static files which were serving fine from subdirectories of the main root no longer serve and I just get a 404. 

I've tried many different configuration options but I don't seem to understand what has changed or how to fix it.  

My app.yaml is: 

runtime: php
env: flex

runtime_config:
    operating_system: ubuntu22
    runtime_version: 8.3
    document_root: web

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

 Thanks to anyone who can point me in the right direction! 

4 1 125
1 REPLY 1

It sounds like the issue might be related to the `document_root` setting in your `app.yaml`; ensure that the `web` directory is correctly set as the root for serving static files, and double-check that your server configuration allows access to subdirectories within it.

Top Labels in this Space
Top Solution Authors