I have a PHP app deployed to Google App Engine Flexible, the app works but only index.php does and all static files contain the content of index.php. Basically it's like the handler always respond with index.php no matter the path.
If I change my app.yaml file to contain the following code then static files start to work but then any other .php file gets a 405 error and it gets downloaded by the browser.
build_env_variables: NGINX_SERVES_STATIC_FILES: true
I understand I need to somehow get nginx-app.conf to work but no matter which configuration I try it never works. For the record I already set document_root to "public_html" in my app.yaml.
The hello world nginx-app.conf example provided by Google is really simple but definitely doesn't work.
# try to serve file directly, fallback to front controller
try_files $uri /index.php$is_args$args;
}
Any idea? Thanks!