I'm new to front end web app development. I'm receiving a WebSocket connection failure as follows:
WebSocket connection to 'ws://127.0.0.1:7983/websocket/' failed: Error in connection establishment: net::ERR_EMPTY_RESPONSE
I looked up this WebSocket error and found diverted to the following pages.
Shiny & RStudio Server: "Error during WebSocket handshake: Unexpected response code: 404"
WebSocket connection failed with nginx, nodejs and socket.io
Rstudio and shiny server proxy setting
I then downloaded nginx on my Windows 7 machine and added the following comment in nginx.conf, saved and executed runApp().
location /rstudio/ {
rewrite ^/rstudio/(.*)$ /$1 break;
proxy_pass http://localhost:7983;
proxy_redirect http://localhost:7983/ $scheme://$host/rstudio/;
}
This didn't seem to solve the issue. I think I may need to add some extra stuff into the nginx.conf file or put it in a specific directory. Please assist. Thanks!
EDITED the nginx.conf script as follows:
location /rstudio/ {
rewrite ^/rstudio/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:5127;
proxy_redirect http://127.0.0.1:5127/ $scheme://$host/rstudio/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}