Will a reverse proxy allow a camera feed look like it's in a subdirectory of a website?

wondering

n3wb
Joined
Aug 10, 2018
Messages
21
Reaction score
3
Location
United States
My first question is will a reverse proxy effectively allow me to host a website on the same network as the Blue Iris server and make it look like the Blue Iris camera feeds are in a subdirectory of the website?

Secondly, is it possible to set an htaccess or NGINX rule (in the case of a Linux web server) that will, in effect, intercept connection attempts to anything within the subdirectory used to view Blue Iris camera feeds?

Currently, I have an htaccess rule that says, "If trying to access anything within a certain directory, in this case /wp-content/uploads/, instead load a PHP file, which checks to see if the traffic or connection meets certain conditions, in this case is logged into the site as a user in the WordPress database. But would this actually work with a Blue Iris camera feed that originates from the same place, accomplished presumably through a reverse proxy, when it is not technically a file?

Ultimately, I am trying to design a solution that replaces an old system where Blue Iris (version 3, if you can believe it) outputs one JPEG file per second into a directory, and the public URL for that image is used to embed it on a protected page on a WordPress website. The issue is that copying and pasting the image URL means that it can be viewed by anybody with the link. Where I am at right now is putting the WordPress website on the same network or server as the Blue Iris server so that Blue Iris can output the images files directly to the website (WordPress directory) and thus use an htaccess rule to intercept and protect access to the automatically-refreshing JPEG files.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
This isn't exactly what you are looking for, but this page describes setting up a reverse proxy server for Blue Iris using nginx. You'll want something more specialized if you want custom authentication and only want to provide access to jpeg frames.

But yes, I imagine everything you are asking for is possible. I am just not quite sure how.
 

wondering

n3wb
Joined
Aug 10, 2018
Messages
21
Reaction score
3
Location
United States
This isn't exactly what you are looking for, but this page describes setting up a reverse proxy server for Blue Iris using nginx. You'll want something more specialized if you want custom authentication and only want to provide access to jpeg frames.

But yes, I imagine everything you are asking for is possible. I am just not quite sure how.
bp2008, I am trying to get this to work right now. Let me me rephrase my original post into a single, simpler question. If my stream is viewable at , for example, will a reverse proxy set up on a web server located on the same network make it so that the camera stream is now viewable via, say, The goal is to run some authentication that is external to and managed outside of Blue Iris, a simple example of which would be htpassword, I think.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
Yes, that is totally doable as you have described, using a simple configuration like I linked above. If you don't even care about using HTTPS in your proxy server, then you could simplify your nginx configuration by taking out the ssl parts and changing the listening port to 80. Then you don't need to worry about providing a certificate.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,041
Location
USA
You should be able to proxy just the "mjpg" subfolder, even, by changing the location / line to location /mjpg/ and adding the mjpg subfolder to the proxy_pass line.
 
Top