Proxying to ip-camera

wishmaster artemrts at ukr.net
Fri Apr 8 05:45:48 UTC 2016


Hi, Francis.

> 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.
> 
> > As I can see the problem is in not proxying static content like JS and CSS. Dynamic works fine.
> > 
> > location /ipcam {
> > proxy_pass http://192.168.20.99:80/;
> > 
> > location ~ \.css {
> > proxy_pass http://192.168.20.99:80/
> > }
> > }
> > 
> > This is not working.
> 
> Your first config would probably work if that was the only config in the
> server{} block. Since it appears that you have some other configuration
> there, possibly
> 
> location ^~ /ipcam/ {
> proxy_pass http://192.168.20.99:80/;
> }
> 
> will do what you want. Note: location and proxy_pass both end in a /,
> and ^~ is used in the location directive.

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.

--
Vitaliy

 
 



More information about the nginx mailing list