#[SOLVED] Sefl-hosted appwrite function domain

30 messages · Page 1 of 1 (latest)

wild pulsar
#

Hey all. I'm having trouble hosting my appwrite function domain. First, I already registered a domain say, example.com, and I have configured wildcard ssl certificate and wildcard domain to host my appwrite on this example.domain (appwrite.example.com), and I also configured nginx to proxy_pass appwrite.example.com to localhost. I also changed _APP_DOMAIN_FUNCTIONS in .env to appwrite.example.com. Everything works fine until I deploy a function and a random function ID is assigned to the appwrie.example.com domain. It seems that I have to configure wildcard * to appwrite.example.com. And, the domain section in the function section doesnt have a CNAME.

#

and how to setup wildcard domain for deployed functions in nginx so it can pass to appwrite on localhost ?

glass quail
wild pulsar
#

Thanks for your quick response. I guess I missed configuring appwrite function domain. _APP_DOMAIN_FUNCTIONS must have functions subdomain on top of backend.example.com right ?

wild pulsar
glass quail
wild pulsar
#

yeap. It works perfectly. I already configured wildcard ssl and can visit via https://appwrite.my_domain.com

glass quail
wild pulsar
#

This is my domain config in namecheap

#

and this is the nginx block for my appwrite

#

do I need to add a .function.backend.my_domain.com to nginx ?

glass quail
glass quail
#

You need a config that points *.functions.example.com to your Appwrite instance

glass quail
wild pulsar
wild pulsar
glass quail
wild pulsar
#

I tried that. the https://function_id.backend.my_domain.com display the content of the main page https://my_domain.com

glass quail
wild pulsar
#

nope. Another webpage I hosted on https://my_domain.com . Appwrite console is on https://backend.my_domain.com

#

Do you have a sample nginx configuration in case? I read some threads on appwrite supports already but it doesn't work from my understanding Lol

glass quail
glass quail
#

but also, your nginx config should just be something like:

server_name *.functions.example.com backend.example.com;
wild pulsar
#

Hi @glass quail , thank you so much for your support. I figured out my problem. I didn't create a new txt record for my wildcard *.backend.my_domain.com. Initially I used ssl cerf from letsencrypt for wildcard at the fist level *.my_domain.com for the second level subdomain, and ssl cerf from letsencrypt only works for a single wildcard domain.

glass quail
wild pulsar
#

Yeap