Proxying to ip-camera

wishmaster artemrts at ukr.net
Thu Apr 7 15:44:08 UTC 2016


> 
> Hi,
> 
> 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
> 
> Below config:
> 
> location /ipcam {
> proxy_pass http://192.168.20.99:80/;
> proxy_redirect off;
> proxy_set_header Host $host:$server_port;
> proxy_set_header X-Real-IP $remote_addr;
> }
> 
> All works fine, but ip-cam can not determine UA and therefore I gets broken login page and unable to login. 
> 
> Below the error log from console:
> 
> ReferenceError: Browser is not defined
> if(!(Browser.ie7 || Browser.ie8)){
> 
> With port redirection by firewall all works fine.
> 
> Is anybody can help me. IP-camera - Dahua.
> 

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.
 
 



More information about the nginx mailing list