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
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.
— Original message —
From: “Francis D.” [email protected]
Date: 8 April 2016, 10:12:08
With port redirection by firewall all works fine.
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.
Yes, I have thought about this. This will work.
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.
I think this is the esiest way. Thanks.
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.
This is not working.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.