Skip to content

Instantly share code, notes, and snippets.

@olegbuevich
Created January 17, 2018 14:25
Show Gist options
  • Save olegbuevich/884b8f1554b7ca096af58a22a191848a to your computer and use it in GitHub Desktop.
Save olegbuevich/884b8f1554b7ca096af58a22a191848a to your computer and use it in GitHub Desktop.
.htaccess proxy nodejs app with websockets
# a2enmod proxy_wstunnel
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule ^(.*) ws://localhost:10081/$1 [P]
RewriteRule ^(.*) http://localhost:10081/$1 [P]
@wachukxs
Copy link

I've been searching for these exact lines of codes for weeeeeeeeeeeeeeeeeeeks.

I love you and you have no idea!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@ZenbladeJS
Copy link

SAME DUDE!

@341
Copy link

341 commented Mar 12, 2020

How to write .htaccess what will not indicate subdomains, or what should i add to subdomain .htaccess to fix my wordpress site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment