Hello everyone,
I have been struggling for days trying to make our vpl jail server work behind an nginx reverse proxy. Everytime I tried to compile and run a program inside the vpl module in Moodle, I got no console displaying and a logged message "URL path not found" in syslog. When I traced connections to the vpl server, I could see that the Moodle server correctly sent the piece of code and all relevant data to the vpl server, but the Websocket connection from the browser to monitor the execution failed.
Eventually, I had a look into the source code of the vpl server and discovered that this error message is thrown when vpl is called using a plain http request that do not match robots.txt or favicon.ico. Websocket requests are handled by another part of the code. So, I managed to find why vpl did not consider calls to the monitor as WS requests.
It seems that a specific header is used to check if a request is a plain http or WS request. After Qwanting (like Googling, but using Qwant), I found two lines I had to add to my nginx site configuration file to make it proxy requests as WS requests:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
Now, everything is working smoothly.
BTW, I was previously using HAProxy as reverse proxy and it correctly handled ws connections without any further configuration.
I hope this will be helpful to other people...