Sync gateway behind https apache server using proxy

Hi, i’m using Apache 2 to proxy to use the sync gateway. I’m using Letsencrypt to encrypt the connection. I have the sync gateway on port 5001. When I use the normal http port, it’s working correct, but not behind an https connection.

Here’s the error, when opening mobile/_changes?feed=websocket in browser:
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /mobile/_changes.

Reason: Error reading from remote server

Apache/2.4.7 (Ubuntu) Server at gateway.[url].com Port 443

The same error is in my xcode console. Without ?feed=websocket there’s no error.

this is my conf file settings

<Proxy *>
    Order deny,allow
    Allow from all

ProxyRequests Off
ProxyPreserveHost On

<Location /ws/>
  	ProxyPass ws://

   <Location /wss/>
  	ProxyPass wss://

ProxyPass /
ProxyPassReverse /