This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is used by App Engine flex environment PHP runtime by name convention nginx-app.conf: | |
# https://cloud.google.com/appengine/docs/flexible/php/runtime#customize_nginx | |
# App Engine rewrites everything to index.php$uri, this prevents us to catch | |
# anything else with `location` block, so the hack is to catch it with another | |
# rewrite that lets us handle in our own `location ~ ^/myapp` below | |
# (https://github.com/GoogleCloudPlatform/buildpacks/blob/ff2ea2737a928087dcec192bf3ce103dc356ad5e/pkg/nginx/nginx.go#L93) | |
rewrite ^/index.php(.*)$ /myapp$1; | |
# If you need to handle any php file, not just index.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is used by App Engine flex environment PHP runtime by name convention nginx-app.conf: | |
# https://cloud.google.com/appengine/docs/flexible/php/runtime#customize_nginx | |
# App Engine rewrites everything to index.php$uri, this prevents us to catch | |
# anything else with `location` block, so the hack is to catch it with another | |
# rewrite that lets us handle in our own `location ~ ^/myapp` below | |
# (https://github.com/GoogleCloudPlatform/buildpacks/blob/ff2ea2737a928087dcec192bf3ce103dc356ad5e/pkg/nginx/nginx.go#L93) | |
rewrite ^/index.php(.*)$ /myapp$1; | |
# Handle this our way first because we want to try serving a file if it matches, |