Similar to the topic “Custom URL when using nginx”, I am trying to use ShinyProxy behind nginx with a server.contextPath
. But I cannot seem to get the server.contextPath
recognized.
This is for ShinyProxy version 2.0.1.
My application.yml
is simply
server:
contextPath: /r-shiny/
proxy:
authentication: none
docker:
internal-networking: true
specs:
- id: 01_hello
container-cmd: ["R", "-e", "shinyproxy::run_01_hello()"]
container-image: openanalytics/shinyproxy-demo
container-network: shinyproxy
(I have the ShinyProxy running inside a docker container.)
and in my default.conf
for nginx is simply
server {
listen 80;
location /r-shiny/ {
proxy_pass http://shinyproxy:8080/r-shiny/;
}
}
Without the server.contextPath
I am able to connect just fine to http://localhost:8080
and launch the example app. However with the server.contextPath
I cannot access it via nginx at http://localhost/r-shiny/
… it seems to ignore the contextPath
to some extent, as I get 404 errors trying to get e.g. /webjars/bootstrap/3.3.7/js/bootstrap.min.js
and the page itself seems to be a 404 error from ShinyProxy.
Any guidance would be appreciated.