Solved: ruTorrent issue after installing

I installed rTorrent with dietpi-launcher and got this error:

[25.03.2022 11:48:40] WebUI started.
[25.03.2022 11:48:40] Bad response from server: (200 [parsererror,getplugins]) SyntaxError: expected expression, got ‘<’

I’m using nginx as webserver. How can I fix this? Thank you in advance.

Specs: DietPi 8.2.2 (aarch64) on Raspberry Pi 4 4GB.

Nginx config:

#D I E T - P I
# /etc/nginx/sites-available/default

server {

        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www;
        index index.php index.html index.htm index.nginx-debian.html;

        server_name "$hostname";

        include /etc/nginx/sites-dietpi/*.conf;

        location / {
                try_files $uri $uri/ =404;
        }

        location ~ \.php(?:$|/) {
                include snippets/fastcgi-php.conf;
                fastcgi_pass php;
        }

}

After adding php block to rutorrent in /etc/nginx/sites-dietpi/dietpi-rutorrent.conf, it worked.

location ^~ /rutorrent {
        auth_basic "ruTorrent login";
        auth_basic_user_file /etc/.rutorrent-htaccess;
        location ~ ^/rutorrent/(?:conf|share)(?:/|$) { return 404; }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        }
}
location ^~ /RPC2 {
        auth_basic "rTorrent login";
        auth_basic_user_file /etc/.rutorrent-htaccess;
        include scgi_params;
        scgi_pass unix:/mnt/dietpi_userdata/downloads/.session/rpc.socket;
}

Thanks for contributing the solution :slight_smile:. Linking the PR which fixes it for DietPi v8.3: https://github.com/MichaIng/DietPi/pull/5375