Skip to content

Instantly share code, notes, and snippets.

@barryvdh
Created November 26, 2018 13:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save barryvdh/5efd8db5f0bfa88adb587ccae8cb6dd9 to your computer and use it in GitHub Desktop.
Save barryvdh/5efd8db5f0bfa88adb587ccae8cb6dd9 to your computer and use it in GitHub Desktop.
Httpd.conf Customization for Apache (DirectAdmin Custom HTTPD Configurations)
# Rewrite the WS requests
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:6001/$1 [P,L]
# Rewrite the HTTP requests
ProxyPass /socket.io http://localhost:6001/socket.io
ProxyPassReverse /socket.io http://localhost:6001/socket.io
# For API requests
ProxyPass /apps http://localhost:6001/apps
ProxyPassReverse /apps http://localhost:6001/apps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment