2

I'm running a Symfony 4 app on Google App Engine with a flexible environment config.

public/index.php is the index path from the project root.

I have defined a document_root: public, but it is not recognized.

For example:

https://myproject.appspot.com/ returns a 404.

https://myproject.appspot.com/public/index.php returns a 200.

It doesn't matter if it's a php file or a static resource. I have to add public to the path to access anything. Of course the desired behavior is that public is my document root.

The relevant parts of my app.yml are here:

runtime: php
env: flex

runtime_config:
  document_root: public

This follows all the documentation I have found. Any ideas on how to resolve this?

Coder1
  • 13,139
  • 15
  • 59
  • 89
  • 2
    I just tested this and works for me. My app has a single `index.php` under a `public` directory, and my `app.yaml` looks just like the above snippet. Can you give that a try? Also can you look at the app logs in Cloud Console to see if there's some error when processing the request? – András Kerekes Mar 09 '18 at 14:50
  • 1
    Yes, that worked, and in the process I see that was naming the config file `app.yml`, and not `app.yaml`. Thanks a lot! – Coder1 Mar 09 '18 at 16:21
  • 1
    Can you post this as an answer so we know the issue is solved? – Victor M Perez Mar 13 '18 at 14:23

1 Answers1

3

The issue is that I was using a .yml extension instead of .yaml.

Renaming the file from app.yml to app.yaml resolved the issue.

Coder1
  • 13,139
  • 15
  • 59
  • 89