Closed Bluscream closed 2 years ago
Hello, can you please provide more detail what issue are you experiencing and what setup you have?
You are using some webserver (like nginx) as reverse proxy to provide HTTPS for rd-usb? There is no option for HTTPS in rd-usb but reverse proxy with some webserver should work.
I see reverse proxy with HTTPS has issues with socket communication - rd-usb does show up but buttons don't work. These issues should be fixed in 1.15.1 - available here.
I tested 1.15.1 with following nginx configuration and HTTPS works fine:
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /your/certificate.crt;
ssl_certificate_key /your/certificate.key;
server_name rd-usb;
location / {
proxy_pass http://127.0.0.1:5000;
}
}
This is easiest way to provide HTTPS for rd-usb.
Let me know if 1.15.1 solves your issue or you are seeing something else.
Oh lol nice. Yeah i had this issue aswell. Ill give more detailed infos later
Quick rundown:
Apache2 Raspi 4 (4gb) x64
Also i want rd-usb served from a path instead of a subdomain
I'm not familiar with Apache so I can't help you directly. With nginx it works with configuration like this:
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /your/certificate.crt;
ssl_certificate_key /your/certificate.key;
server_name domain.tld;
# your other things
location /rd-usb {
proxy_pass http://127.0.0.1:5000;
}
}
Here you need extra step - you need to specify what path/prefix you are using with --prefix
parameter. In this example /rd-usb
needs to be specified as --prefix /rd-usb
something like python app.py --prefix /rd-usb
(--prefix
was added in 1.16.0).
Apache2 configuration should be similar - nothing special is required just basic HTTPS reverse proxy.
Thanks that worked. 👍🏻
Although i got a different (maybe related) problem now:
This is issue with connection - unrelated to apache/proxy, apache/proxy seems to work fine if you get such error. Do you have selected serial port? Seems like yours is empty. It should be something like /dev/rfcomm0
:
Another thing about the proxy thing. when using --prefix it seems like all "redirect to home"s are still redirecting to the root url :o
Got the permission stuff working by chown'ing the port. Sorry for mixing up issues.
To continue the prefix stuff:
https://domain/graph?session=
when clicking disconnecthttps://domain/data
Also thanks for your quick help and sorry for being such an annoying prick :)
Could you drop me your paypal so can send a fiver over for your work?
Redirects fixed in 1.16.1. Hopefully that's all of them.
Correct - root is bad idea indeed just add your user to dialout
group. I tried usermod -aG dialout www-data
and rd-usb did connect to rfcomm fine running as user www-data. Identical to what you did. I have regular Debian not RaspberryPI but Raspbian is also Debian so not sure why it doesn't work for you. If you need to chown then remember it will disappear on reboot - you need run rfcomm bind ...
and chown after every boot.
BTW: Keep in mind you should never explose rd-usb on untrusted network or to untrusted users. HTTP basic auth trough your web server is good idea.
I don't see this as annoying. You found reasonable shortcoming that should be addressed and questions from users reflect bad state of documentation! Paypal: tomas@kolinger.name
.
Closing this as it is mostly resolved. You'll get the money once my paypal balance is postive again :joy:
I want to host the webinterface on my internal website but everything seems to be unhappy to serve this http website through https