twinkle-labs / twinkle-notes

End-to-end encrypted notes application
https://twinkle.app
GNU Affero General Public License v3.0
121 stars 5 forks source link

[HELP] Websocket handshake error. #1

Open mzch opened 4 years ago

mzch commented 4 years ago

When accessing web app, the server respond. ebSocket connection to 'wss://encmemo.com/ws/mux' failed: Error during WebSocket handshake: Unexpected response code: 200

How can I fix this issue?

ServerName encmemo.com ServerAlias www.encmemo.com ServerAdmin webmaster@encmemo.com Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/encmemo.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/encmemo.com/privkey.pem RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1$1 [R=301,L] ProxyPreserveHost On ProxyRequests off RewriteEngine On RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteRule .* ws://127.0.0.1:6782/$1 [P,L] ProxyPass / http://127.0.0.1:6782/ ProxyPassReverse / http://127.0.0.1:6782/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

vim: syntax=apache ts=4 sw=4 sts=4 sr noet

litchie commented 4 years ago

I only tried NGINX briefly before. Unfortunately I lost the server configure file.

litchie commented 4 years ago

See #11