Hi,
I was looking into using nginx as a reverse proxy for the FlexSim HTTP web server and ran into an issue when using path prefixes. I have nginx listening on port 443 and the FlexSim web server on port 4200, so the relevant part of my nginx config looks like this:
server { listen 443 ssl; server_name example.com <snip> # server_name and ssl_ configuration here location /model/ { proxy_pass http://127.0.0.1:4200/; } }
So the idea is that going to https://example.com/model should show the FlexSim server... and that works! Almost! I get the interface and I can start an instance:
But when I try to connect to the instance I get a 404 not found. The problem seems to be that somewhere in the internals of the webserver, it constructs an incorrect path:
It tries to load
/model/webserver.dll/queryinstance=tutorials\FlexSim 2023\StatisticsCollectorTutorialModel&instancenum=1/?defaultpage&dashboardstats=1&time=1675761445901
but that gives a 404 Not Found error.
I guess one solution is: then don't use the reverse proxy... but this feels like I should be able to get it to work but it's just a small bug... right? :-)