I want to open different visualizations from multiple CODESYS webservers using a reverse-proxy. Each visualization should work with the webserver's primary IP-address and a location path of the proxy. The visualization includes URL jumps to other CODESYS webservers that are accessible in the same local network. This requires replacing the content site's URL when it's opened through the proxy, as it's not possible to change the URL addresses in the PLC program.
Description and Overview
I have a fully functioning Nginx configuration that allows accessing the webvisu from the controllers through a reverse-proxy.
The visualizations have url jumps that direct to other webservers. For example: On the webserver visu1, there is a button with an URL jump to the url of visu2.
Such behaviour is normal, and it can be solved by using sub_filter for nginx.
So, I configured the sub_filter and I see from the client site, that the origin url is replaced.
But I'm afraid that the WebVisuV3.bin is doing some checks with the program code before the jump is executed. From my point of understanding it checks the size of the given URL string or something, because I get following error: Actual packet size 936 smaller than expected 940.
If I change the string to something else or add some whitespaces, it shows that the size does change.
I attached a gif which shows this:
Hi kevinrn,
I have the same question as yours.
On my side I try to make nginx work but it doesn't goes well. I think the sub_filter doesn't work int this case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi community,
I want to open different visualizations from multiple CODESYS webservers using a reverse-proxy. Each visualization should work with the webserver's primary IP-address and a location path of the proxy. The visualization includes URL jumps to other CODESYS webservers that are accessible in the same local network. This requires replacing the content site's URL when it's opened through the proxy, as it's not possible to change the URL addresses in the PLC program.
Description and Overview
I have a fully functioning Nginx configuration that allows accessing the webvisu from the controllers through a reverse-proxy.
Image overview:
Overview.png
Devices:
DDC1 with webvisu: 192.168.20.86 (Webserver port: 80)
DDC2 with webvisu: 192.168.20.87 (Webserver port: 80)
nginx reverse proxy server: 192.168.20.205 (nginx port: 4000)
nginx reverse proxy configuration:
This configuration works as expected and I can open the visualizations through the proxy-server.
visu1: http://192.168.20.205:4000/visu1
visu2: http://192.168.20.205:4000/visu2
Problem:
The visualizations have url jumps that direct to other webservers. For example: On the webserver visu1, there is a button with an URL jump to the url of visu2.
Such behaviour is normal, and it can be solved by using
sub_filter
for nginx.So, I configured the
sub_filter
and I see from the client site, that the origin url is replaced.But I'm afraid that the
WebVisuV3.bin
is doing some checks with the program code before the jump is executed. From my point of understanding it checks the size of the given URL string or something, because I get following error:Actual packet size 936 smaller than expected 940.
If I change the string to something else or add some whitespaces, it shows that the size does change.
I attached a gif which shows this:
size-change.gif
Questions
Thank you in advance,
cheers
Kevin
Hi kevinrn,
I have the same question as yours.
On my side I try to make nginx work but it doesn't goes well. I think the sub_filter doesn't work int this case.