My goal is to serve a SPA and PHP api on the same site. I would like to be 
able to browse the website at mywebsite.com, and request api calls at 
mywebsite.com/api/.

My directory structure is:

public
|
+-- index.html 
+-- api
     |
     index.php


My app.yaml:

runtime: php
env: flex

runtime_config:
  document_root: public


Navigation to mywebsite.com gives a 404 because public/index.php doesn't 
exist.



So I tried this app.yaml:

runtime: php
env: flex

runtime_config:
  document_root: public
  front_controller_file: index.html


And I can access mywebsite.com normally since index.html is the default 
file, but api/index.php is still 404.


Is something like this possible on App Engine php flex? I've read the docs, 
no mention on how to handle routing like this. 
https://cloud.google.com/appengine/docs/flexible/php/configuring-your-app-with-app-yaml


Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4f4c1977-6d90-49ad-bb3e-17ac7964568c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine... Chris Fremgen

Reply via email to