I can see that the root _APP_DOMAIN_FUNCTIONS is blocked from being used for functions on the below file line
https://github.com/appwrite/appwrite/blob/c076dfe6f14ddacc4f658fdff85fbdbe31e05636/app/controllers/general.php#L63
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 (myapp.com)
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 mycompany.com
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
with the _APP_DOMAIN_FUNCTIONS, appwrite generates a custom unique subdomain for each function like:
asjidojriweoj.domain.com
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:
_APP_DOMAIN=appwrite.mycompany.com
_APP_DOMAIN_FUNCTIONS=functions.appwrite.mycompany.com
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 functions.appwrite.mycompany.com
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
with _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:
- appwrite.mycompany.com
- *.functions.appwrite.mycompany.com
- test.mycompany.com
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
Recommended threads
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...