Skip to content

Instantly share code, notes, and snippets.

@Dubiy
Last active May 17, 2017 18:15
Show Gist options
  • Save Dubiy/8e127158190702a98493 to your computer and use it in GitHub Desktop.
Save Dubiy/8e127158190702a98493 to your computer and use it in GitHub Desktop.
apache config for websocket
<VirtualHost *:80>
ServerName chat-backend.testserver.com
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/ [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment