I am trying to stream video data to and from uberspace via nodejs and jsmpeg.
My problem is that I'm getting a 404 when trying to access the url:
The requested URL /receive was not found on this server.
The url I am accessing is like this:
https://stream.mydomain.com/receive
and this is my .htaccess:
DirectoryIndex disabled
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^send/(.*) http://localhost:61624/$1
RewriteRule ^receive/(.*) ws://localhost:61625/$1
</IfModule>
Two things here.
1) This rule
RewriteRule ^receive/(.*) ws://localhost:61625/$1matches on/receive/xxxwith a trailing slash afterreceive(xxxpart as optional). So you need to access at least/receive/in your case. Is it what you expect ? If not, simply adapt your rules.2) You need to use
mod_proxyfor both rules (use of thePflag)Note, though, that this method is not the fastest. If possible, use
ProxyPassandProxyPassReverseinside your apache config instead of an htaccess.