
I've just noticed that when I use my IP address with the port where Appwrite is installed on my server, they all work very well. But when I use the reverse proxy domain name linked to the ip address mentioned above, the problem starts all over again.

This locale problem is different. Let's keep that conversation on that other thread

You need something like this if you use apache:
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:8000/$1 [P,L]

change the IP and Port based on what you have

okay

Let me try

I have same error š

- What did you add exactly?
- What ports are being used by your appwrite instance?
- Perhaps you also need
RewriteCond %{HTTP:Connection} upgrade [NC]

1 .... `<VirtualHost *:80> ServerName mboasms.cm ServerAlias www.mboasms.cm
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://localhost:89/
ProxyPassReverse / http://localhost:89/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mboasms.cm [OR]
RewriteCond %{SERVER_NAME} =www.mboasms.cm
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://78.46.11.35:89/$1 [P,L]
</VirtualHost>`

- port 89 for http and 90 for https

Are you sure alias is correct? Also did you have tried instead of localhost, setting the server IP?

When a i use Ip i have error.

`<VirtualHost *:80> ServerName mboasms.cm ServerAlias www.mboasms.cm
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://78.46.11.35:89/
ProxyPassReverse / http://78.46.11.35:89/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mboasms.cm [OR]
RewriteCond %{SERVER_NAME} =www.mboasms.cm
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://78.46.11.35:89/$1 [P,L]
</VirtualHost>`

make sure you use 3 backticks for multi line code

is apache on the same server as Appwrite?

Yes

I would suggest proxying to HTTPS and localhost and also enabling firewall to block port 89 and 90

so maybe something like:
<VirtualHost *:80>
ServerName mboasms.cm
ServerAlias www.mboasms.cm
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://locaol:89/
ProxyPassReverse / http://localhost:89/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mboasms.cm [OR]
RewriteCond %{SERVER_NAME} =www.mboasms.cm
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://localhost:89/$1 [P,L]
</VirtualHost>

but also this is only the port 80 apache config. you need the port 443 one too

I have applied your suggestions but the problem persists. š š

What's your 443 apache config?

`<VirtualHost *:443> ServerName mboasms.cm ServerAlias www.mboasms.cm
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
<Proxy *>
Require all granted
</Proxy>
ProxyPass / https://localhost:90/
ProxyPassReverse / https://localhost:90/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mboasms.cm [OR]
RewriteCond %{SERVER_NAME} =www.mboasms.cm
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) wss://localhost:90/$1 [P,L]
</VirtualHost>`

Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting

So what's the error now?

The same error when i remove client.setSelfSigned()
Recommended threads
- Problems with adding my custom domain
- Can't push functions when self-hosting o...
Hello, I'm a bit new to appwrite functions and recently hosted a fresh 1.7.4 on my portainer setup. Tried to create a new function and when trying to push it I ...
- Self-hosted Appwrite keeps slowing down ...
For some reason my self-hosted instance of Appwrite periodically slows down so much and becomes unresponsive (console, APIs, everything). I keep restarting the ...
