Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

proxying webrtc-streamer

$
0
0
Hi;

OpenWrt x86_64. I have a webrtc-streamer instance serving RTSP IP cameras at 192.168.1.8:8000 which is working on my local LAN, and, if I port forward, also on wan at mysite:8000. Now, I want to use name based as opposed to port redirection.

[code]
upstream video {
server 192.168.1.8:8000;
}

server {
listen 80;
listen [::]:80;
server_name rossco.org *.rossco.org;
location /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
alias /var/letsencrypt/;
}
location /cameras/ {
rewrite ^/cameras/.* $1 last;
proxy_pass http://video;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
return 301 https://$host$request_uri;
}
}

server {
listen 443;
listen [::]:443;
server_name rossco.org *.rossco.org;
...
}
[/code]

Intent is that www.rossco.org/cameras is re-written (strip cameras from url) and redirects to 192.168.1.8:8000.

What I am seeing is error 404, indicating location "cameras" not being recognized. No re-write.

Anyone want to throw me a bone?

Thanks;
Bill

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>