using /.well-known/ URL path with flex environment

46 views
Skip to first unread message

Vick Khera

unread,
Nov 20, 2017, 10:33:26 AM11/20/17
to Google App Engine
I'm trying to confirm a service that requires me to drop a file into the /.well-known/ path on my server. I've found many articles online that suggest adding a "handler" section to my app.yaml file and mapping the .well-known url to a directory named well-known. However, that a) doesn't see to work in the flex environment, and b) is not documented as a known section for app.yaml in the flex environment, so it kind of follows that it won't work.

What is the recommended way to serve this URL in flex environment?

I'm running WordPress using the PHP 7.1 environment using the template from github.

Vick Khera

unread,
Nov 20, 2017, 12:22:04 PM11/20/17
to Google App Engine
My best lead to solving this seems to be to use an nginx location directive like this and placing the files into a directory called well-known in my application root directory.

location /.well-known/ {
    alias /some/path/well-known/;
}

However, I do not know what the absolute path to the application root directory is in the flex environment. I was not able to find it searching the documents, either. Where can I find this? Is it provided as a variable in the nginx config?

Vick Khera

unread,
Nov 20, 2017, 3:15:01 PM11/20/17
to Google App Engine
Here's my final solution:

location ^~ /.well-known/ {
    alias /app/well-known/;
}

I figured out the path by watching a deploy and noticing the web root was inside /app and deduced that was the application root for flex engine. Using the ^~ match causes it to overrule the prohibition against serving files beginning with a period.

Reply all
Reply to author
Forward
0 new messages