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
- All projects deleted
Hello, from the appwrite console last week I re-activated some of my old project and published them, yesterday I checked and none of the apps were working, now ...
- Authentication on custom Websocket Serve...
Hi, I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies ...
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...