Rutorrent with Nginx and XMLRPC

I am trying to configure rutorrent on an updated Arch Linux home server, but I cannot get it to work mainly due to inexperience and outdated documentation.

Problem:

I can't get rtorrent to talk to nxinx. When I had rutorrent showing on nginx, it will not be able to connect to rtorrent and will give this error among many other plugin errors:

Bad response from server: (200 [parsererror,getuisettings])

Nginx Error Log:

2015/07/24 17:29:49 [error] 11837#0: *19 upstream prematurely closed connection while reading response header from upstream, client: 192.168.x.<my remote machine>, server: localhost, request: "GET / HTTP/1.1", upstream: "scgi://unix:/home/user/scgi.socket:", host: "192.168.x.<my local nginx server>"

When visiting the nginx URL index:

502 Bad Gateway

In rtorrent:

(17:50:40) Closed XMLRPC log.

Configuration files:

Here are the relevant parts of my configuration files:

.rtorrent.rc:

#encoding_list utf-8
scgi_local = /home/user/scgi.socket
execute = chmod,ug=rw\,o=,/home/user/scgi.socket
execute = chgrp,http,/home/user/scgi.socket
#scgi_port = 127.0.0.1:5000

nginx.conf:

http {

include       mime.types;
default_type  application/octet-stream;
sendfile        on;
#tcp_nopush     on;
#keepalive_timeout  0;
keepalive_timeout  65;
#gzip  on;

log_format   main '$remote_addr - $remote_user [$time_local]  $status '
 '"$request" $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /etc/nginx/logs/access.log  main;
error_log   /etc/nginx/logs/error.log notice;

server {
    listen       80;
    server_name  localhost;
    #charset koi8-r;
    location / {
        root   /usr/share/nginx/html/rutorrent;
        index  index.html index.htm;
        include scgi_params;
        scgi_pass  unix:/home/user/scgi.socket;
    }

full rutorrent config.php file:

http://pastebin.com/1tAZb6DM

, - . rtorrent, nginx, . XML, scgi/unix php ( python), , . , - "RCP2", . blog.abevoelker.com RCP2 nginx.conf.

, , . , , , .

/:

http://linoxide.com/ubuntu-how-to/setup-rtorrent-rutorrent/

https://blog.abevoelker.com/rtorrent_xmlrpc_over_nginx_scgi/

https://github.com/rakshasa/rtorrent/wiki/RPC-Setup-XMLRPC

https://github.com/Novik/ruTorrent/issues/974

+4
source share

Source: https://habr.com/ru/post/1599589/


All Articles