Welcome! Log In Create A New Profile

Advanced

Re: Proxying to ip-camera

Francis Daly
April 08, 2016 03:14AM
On Fri, Apr 08, 2016 at 08:45:48AM +0300, wishmaster wrote:
> > On Thu, Apr 07, 2016 at 06:44:08PM +0300, wishmaster wrote:

Hi there,

> > > > I have the web site and would like to proxying all requests to /ipcam location to internal ip-camera.
> > > >
> > > > website http://site.com
> > > > ip-cam http://site.com/ipcam
> >
> > > > With port redirection by firewall all works fine.

> > location ^~ /ipcam/ {
> > proxy_pass http://192.168.20.99:80/;
> > }

> Heh, this server block has another locations as well. E.g. location \.css {...} and so on.
> The second problem is I want to proxying location "/ipcam" to "/" on the ip-camera and I think I must use sub module to overwrite pathes of returned css,js in HTML pages.

You can try that.

Alternatively, if you know the (static) list of urls that the ip-camera
uses, you could proxy_pass for each one of those (and make sure that
your main web service does not use any of the same ones). Or, if the
content from those urls is constant, you could just copy the content to
the same urls on your main web server and then not have to proxy_pass
the extra ones.

I suspect it will be easier if you can configure the 192.168.20.99 server
to believe that its application is installed at /ipcam/ instead of /.

And if that is not possible, it may be easier if you use a new server name
for just the camera -- http://ipcam.site.com which just uses proxy_pass
for everything.

In general, I find that it is not trivial to reverse-proxy a web site to
a different hierarchy level in the url space unless the site was written
with that in mind.

Good luck with it,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxying to ip-camera

artem April 07, 2016 10:04AM

Re: Proxying to ip-camera

artem April 07, 2016 11:46AM

Re: Proxying to ip-camera

Francis Daly April 07, 2016 04:46PM

Re[2]: Proxying to ip-camera

artem April 08, 2016 01:48AM

Re: Proxying to ip-camera

Francis Daly April 08, 2016 03:14AM

Re[2]: Proxying to ip-camera

artem April 08, 2016 03:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 276
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready