Back

Accessing appwrite via domain

  • 0
  • Self Hosted
  • REST API
Meister der Magie | Martin
21 Oct, 2024, 16:13

Sorry in advance if I use wrong terminology. It's the first time I fiddle around with backend development. So far I have only worked as a software developer for offline desktop apps.

What do I want to achieve? I want to install Appwrite on a server, to communicate with it from a Unity App via REST. Appwrite should listen at api.mydomain.app, but www.mydomain.app should be a "normal" website with infos about the app and have no connection to appwrite. How do I set this up, especially in regards of DNS?

What is the issue? Well, I don't exactly know. I tried setting everything up, but if I try to make a call to api.mydomain.app, my browser says that the site could not be found. So something must be wired-up wrongly.

What did I try so far? I have a domain at Hostinger. You can see the current DNS settings in the attached images. I entered api.mydomain.app in the subdomain settings and forwarded it to the IP of my vServer.

The .env file of appwrite on my vServer has the following variables. _APP_DOMAIN=api.mydomain.app _APP_DOMAIN_TARGET=api.mydomain.app Is this correct? Or should it be mydomain.app or something entirely different? I'm so confused.

I would be very glad for any hint in the right direction! Thank you!

TL;DR
Developers wants to set up Appwrite on a server to communicate via REST from a Unity app using api.mydomain.app, while keeping www.mydomain.app separate. The issue is that api.mydomain.app cannot be found. They have set up subdomain settings and adjusted the .env file, but something seems to be misconfigured. **Solution:** Check DNS settings to ensure correct forwarding to the vServer's IP. Verify the .env file variables _APP_DOMAIN and _APP_DOMAIN_TARGET are set to api.mydomain.app. Double-check configuration for accuracy.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more