Back

[SOLVED] Can't connect to Appwrite with subdomain

  • 0
  • Self Hosted
  • General
Recovz
3 Mar, 2023, 14:29

Hey !

I come to ask for help. I host Appwrite on a VPS, Apache redirects to Appwrite's port through a reverse proxy.

When I go to https://MY_VPS_IP.com I can connect to the back office. When I go to https://appwrite.example.com I get the following message.

I changed my environment variables: _APP_DOMAIN = appwrite.example.com _APP_DOMAIN_TARGET = appwrite.example.com

Any ideas ? If needed, my Apache .conf file: <VirtualHost *:80> ServerName www.appwrite.example.com ServerAlias appwrite.example.com ErrorLog /var/www/appwrite.example.com/log/error.log CustomLog /var/www/appwrite.example.com/log/requests.log combined Redirect permanent / https://appwrite.example.com/ </VirtualHost>

<VirtualHost *:443> ServerName www.appwrite.example.com ServerAlias appwrite.example.com ErrorLog /var/www/appwrite.example.com/log/error.log CustomLog /var/www/appwrite.example.com/log/requests.log combined

TypeScript
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/appwrite.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/appwrite.example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/appwrite.example.com/chain.pem

SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
ProxyPass / https://localhost:20443/
ProxyPassReverse / https://localhost:20443/
</VirtualHost>
TL;DR
I can't connect to Appwrite using a subdomain. I have set the environment variables correctly and configured Apache as a reverse proxy, but I still get an error message when trying to access the subdomain. Here is my Apache .conf file: ``` <VirtualHost *:80> ServerName www.appwrite.example.com ServerAlias appwrite.example.com ErrorLog /var/www/appwrite.example.com/log/error.log CustomLog /var/www/appwrite.example.com/log/requests.log combined Redirect permanent / https://appwrite.example.com/ </VirtualHost> <VirtualHost *:443>
joeyouss
3 Mar, 2023, 14:34

Hi there 👋 please allow me a moment to look into this

joeyouss
3 Mar, 2023, 16:56

Can you Once check if your domain is set currently in env vars?

joeyouss
3 Mar, 2023, 16:57

If it doesn’t work then here is a related issue https://github.com/appwrite/appwrite/discussions/4056

Recovz
3 Mar, 2023, 18:46

It works thank you !! <:appwriteheart2:1073243188954935387>

joeyouss
4 Mar, 2023, 06:24

[SOLVED] Can't connect to Appwrite with subdomain

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