update /solution:
changing: rewrite ^/cameras/.* $1 last;
to: rewrite ^/cameras/.* $1 break;
(from re-write, look for match, leading to 404 to re-write, continue block processing)
...got me to 192.168.1.8:8000 base page
...then had to deal with static files.
Full solution - working
[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 /nav.css {
proxy_pass http://video;
}
location /api/ {
proxy_pass http://video;
}
location /cameras/ {
rewrite /cameras/(.*) /$1 break;
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]
demo active at: www.rossco.org/cameras/
changing: rewrite ^/cameras/.* $1 last;
to: rewrite ^/cameras/.* $1 break;
(from re-write, look for match, leading to 404 to re-write, continue block processing)
...got me to 192.168.1.8:8000 base page
...then had to deal with static files.
Full solution - working
[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 /nav.css {
proxy_pass http://video;
}
location /api/ {
proxy_pass http://video;
}
location /cameras/ {
rewrite /cameras/(.*) /$1 break;
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]
demo active at: www.rossco.org/cameras/