Unable to use domain root to host function
- Self Hosted
- REST API
I can see that the root
_APP_DOMAIN_FUNCTIONS is blocked from being used for functions on the below file line
For my current implementation, that means that the domain root cannot be used? I was originally interested in using an Appwrite function to host a site at the root, as well as sites on subdomains, but currently that seems impossible.
I guess this is mostly just a request for confirmation 🙂
I would suggest using a dedicated domain for your appwrite instance like
appwrite.mycompany.com because your appwrite instance can have multiple projects. For 1 of your sites (which I'm assuming is 1 function in one of your projects), you could create a custom function domain with whatever domain you want (
so that is what I am doing, for appwrite itself, but with the goal of hosting sites on
*.mycompany.com I had set the
_APP_DOMAIN_FUNCTIONS env var to
This is largely due to my current implementation with Cloudflare proxy, and a nginx reverse proxy handling LetsEncrypt certificates.
I suspect that I would need to adjust my proxy implementation a bit for this to work properly
_APP_DOMAIN_FUNCTIONS, appwrite generates a custom unique subdomain for each function like:
so it doesn't make sense to use that for a website URL/domain.
I was manually assigning the subdomains I wanted to specific functions Like this one right here: https://test.plygrnd.org
I'm reading through your medium nginx post right now
maybe you can do:
And then if you want a site at
test.mycompany.com, create a custom function domain for that in the function
Cloudflare wont do this with the free plan
And from what I have seen, if I dont set
_APP_DOMAIN_FUNCTIONS to the root domain, then the domain verification pops up with the CNAME prompt, which never works
_APP_DOMAIN_FUNCTIONS as the domain root, the domains are validated automatically it seems
in nginx you'd have multiple domains for the same proxy host:
I was just doing
*.mycompany.com with a cloudflare DNS challenge
if that works on the cloudflare side, sure.
on the nginx side...i think
*.mycompany.com only goes 1 level so you'd need another entry for
*.functions.appwrite.mycompany.com. maybe, im not sure
I'll give it a shot, thank you!
it just refuses to verify
even though if I navigate to plygrnd.org I get the appwrite login page
WAIT! even better, verification fails, but the function is working!
thats a riot
Reply to this thread by joining our DiscordReply on Discord
- Can't execute functions
Hello, I already added this to a comment in the functions domains post, but since it seems unrelated I'll create a proper topic here. I get an error when tryin...
- Uploading a doc with relationship attrib...
Ive setup relationships in my colllection and its working well with. So how do i fill the relationship attribute from the client side when uploading the documen...
- Function domain generated in weird forma...
I created function and generated domain is `65e075d9828a5f812d38.https//appwrite.mek.ovh`. `_APP_DOMAIN`, `_APP_DOMAIN_TARGET`, `_APP_DOMAIN_FUNCTIONS` are set...