amefs / quickbox-lite

Lightweigt QuickBox
https://wiki.ptbox.dev/
GNU General Public License v3.0
811 stars 116 forks source link

RPC2 #180

Closed Hipoglos closed 6 months ago

Hipoglos commented 1 year ago

Hi amefs! This is not a bug, but more a question about the implementation of rtorrent. I've installed a dashboard for all my web applications (https://github.com/linuxserver/Heimdall) and it has the option to communicate with rtorrent via RPC2 to show stats on it. I know quickbox doesn't expose any port, so I'm wondering which would be the way to do it, without breaking quickbot lite. Sorry again for posting this here, but I don't know where I could ask for help.

Happy New Year! Hipo,

amefs commented 1 year ago

Just need a scgi pass: if you already has valid SSL cert, just append following code to /etc/nginx/apps/yourname.scgi.conf:

location ^~ /RPC2 {
  include scgi_params;
  scgi_pass unix:/var/run/${username}/.rtorrent.sock;
  #auth_basic "Password Required";
  #auth_basic_user_file /etc/htpasswd.d/htpasswd.${username};
}

or use HTTP port(add to /etc/sites-enabled/rpc.conf):

server {
    listen 8088;
    server_name _;

 location ^~ /RPC2 {
     include scgi_params;
     scgi_pass  unix:/var/run/${username}/.rtorrent.sock;
     #auth_basic "Password Required";
     #auth_basic_user_file /etc/htpasswd.d/htpasswd.${username};
 }
}

After reloading the config, you can access the xmlrpc via http://IP:8088