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/$1
matches on/receive/xxx
with a trailing slash afterreceive
(xxx
part 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_proxy
for both rules (use of theP
flag)Note, though, that this method is not the fastest. If possible, use
ProxyPass
andProxyPassReverse
inside your apache config instead of an htaccess.