Sync_gatewa working fine on android but on IOS it dosent work

HI ,
sync_gateway wi working find on Android but i’m not able to fetch data on IOS ,
I tried to add ssl certificate on sync_gateway but after that i’m getting this.

Client sent an HTTP request to an HTTPS server.

this is a my sync gateway configuration file
{
“log”: ["*"],
“SSLCert”: “/fullchain.pem”,
“SSLKey”: “/privkey.pem”,

“databases”: {
“db”: {
“server”: “http://localhost:8091”,
“bucket”: “db”,
“username”: “username”,
“password”: “password”,
“enable_shared_bucket_access”: true,
“import_docs”: true,
“num_index_replicas”: 0,
“users”: {
“GUEST”: { “disabled”: true, “admin_channels”: ["*"] }

  }
}

}
}

Can you clarify where you are seeing the " Client sent an HTTP request to an HTTPS server." error? Is it in the Sync Gateway logs? Getting a copy of those would be useful.

Ensure the Sync Gateway URL you’re specifying in your app is using the secure version of the websocket protocol scheme. E.g: wss://example.org:4984/your_database instead of the non-secure ws:// version.

If you have any kind of proxy or load balancer in front of Sync Gateway, ensure it is handling HTTPS traffic by visiting the SG URL in a browser.

When i add
“SSLCert”: “/fullchain.pem”,
“SSLKey”: “/privkey.pem”,
then
i see Client sent an HTTP request to an HTTPS server. on https://example.org:4985

I’m using apache to handle proxy request
this is my proxy configuration

ProxyPreserveHost On
ProxyPass / ws://127.0.0.1:4984/
ProxyPassReverse / ws://127.0.0.1:4984/

Everything working fine on Android , But facing issue on IOS.

It looks like you may need to forward the request via the proxy using wss://?

ProxyPass / wss://127.0.0.1:4984/
ProxyPassReverse / wss://127.0.0.1:4984/

But i’m still facing this
When i add
“SSLCert”: “/fullchain.pem”,
“SSLKey”: “/privkey.pem”,
then it shows

Client sent an HTTP request to an HTTPS server.
on https://example.org:4985

Yes, because the client (or in this case the proxy) is sending an insecure request (http/ws) to the server that is only serving secure (https/wss) requests.

From IOS i’m getting Unauthorizes status

do you thing this issue related to this ?

this is my UFW status

Apache Full ALLOW Anywhere
22/tcp ALLOW Anywhere
22 ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)