I don't understand the '/' syntax for base_url #2558
-
Hi, I am trying to connect to a Pluto service that includes the command to run Pluto: the problem seems to be when trying to specify the base_url it fails to launch the service (when I connect to port 8000 only via http, I can get a connection): Pluto.run(threads=6, port=8000,launch_browser=false, require_secret_for_access=false,base_url="https://example.net/") The Configuration.jl file says "it should start be a valid path starting and ending with a '/'". This statement is not clear to me, and I don't know how the back-slash should be used. Can someone please provide me with the right syntax for how the base_url should be specified? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
I think Pluto does not work out of the box with HTTPS, if I remember correctly @fonsp mentioned to me once that you can't simply open a Pluto server on a remote that is accessible through https and have it work via HTTPS, there is some additional things you'd have to set up on the server side to make this work. |
Beta Was this translation helpful? Give feedback.
-
It sounds like you should not set |
Beta Was this translation helpful? Give feedback.
-
Very welcome! For future reference, here is a working nginx location block for HTTP/WS forwarding location /pluto { # if you keep "/pluto" here you also do `base_url` = `/pluto/`. Otherwise do `/` (also depends on what else you have here)
# Not really needed but good practice
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Timeout at 5 minutes; if you upload files, do more
proxy_read_timeout 300s;
proxy_pass http://localhost:port/;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
} |
Beta Was this translation helpful? Give feedback.
Interesting! It sounds like HTTP traffic is working, but WebSocket traffic is not. You can verify this the browser's devtools, check the Console for error messages, or the Network panel for a failed WS request.
You probably need to enable websockets in your nginx proxy: this is something that Pluto uses, but PlutoSliderServer does not (this was one of the reasons, yay!)