CentOS 6 + Lighttpd + FastCGI + Rutorrent: (404 [error,list])

jith45

Member
May 25, 2018
960
0
16
Hi,
I've leased a dedicated server for seedboxing and all this stuff is new for me. When pointing a browser to https://serverip:61359/rutorrent I get this error:
Code:
Bad response from server: (404 [error,list]) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 - Not Found</title> </head> <body> <h1>404 - Not Found</h1> </body> </html>This is what I've done so far:
1. Installed packages:
Code:
libsigc++20, libtorrent, rtorrent, subversion (+dependencies), lighttpd, lighttpd-fastcgi, php, php-gd, php-mysql, rutorrent from svn I probably don't need php-mysql, right?
2. ~/.rtorrent.rc:
Code:
download_rate = 12500
upload_rate = 12500
directory = /home/david/torrents/
session = /home/david/.session/
schedule = low_diskspace,5,60,close_low_diskspace=100M
ip = serverip
port_range = 55365-55365
encryption = allow_incoming,try_outgoing,enable_retry
dht = disable
peer_exchange = no
system.file_allocate.set = yes
execute_nothrow=rm,/tmp/php-fastcgi-1.socket
scgi_local = "/tmp/php-fastcgi-1.socket"
encoding_list = UTF-8
execute = {sh,-c,/usr/bin/php /srv/www/lighttpd/rutorrent/php/initplugins.php david &}3. /etc/lighttpd/lighttpd.conf:
Code:
server.port = 62543
server.username = "david"
server.groupname = "david"
$SERVER["socket"] == ":61359" {
ssl.engine = "enable"
ssl.pemfile = "/home/david/cacert.pem"
}4. /etc/lighttpd/modules.conf
Uncommented include "conf.d/fastcgi.conf"
5. /etc/lighttpd/conf.d/fastcgi.conf:

Code:
fastcgi.server = ( ".php" =>
( "php-local" =>
(
"socket" => "/tmp/php-fastcgi-1.socket",
"bin-path" => "/usr/bin/php-cgi",
"max-procs" => 1,
"broken-scriptfilename" => "enable",
)
),
( "php-tcp" =>
(
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable",
"broken-scriptfilename" => "enable",
)
),

( "php-num-procs" =>
(
"socket" => "/tmp/php-fastcgi-2.socket",
"bin-path" => "/usr/bin/php-cgi",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "16",
"PHP_FCGI_MAX_REQUESTS" => "10000",
),
"max-procs" => 5,
"broken-scriptfilename" => "enable",
)
),
)6. /etc/php.ini
memory_limit = -1
doc_root = "/srv/www/lighttpd/"
user_dir = "/srv/www/lighttpd/"
open_basedir line removed
/etc/php.d/lighttpd.ini
cgi.fix_pathinfo = 1 was already uncommented
8. echo '<?php phpinfo(); ?>' >> /srv/www/lighttpd/index.php
echo 'TestMe!' >> /srv/www/lighttpd/index.html
chown -R david:david /var/log/lighttpd/
chmod -R 755 /var/log/lighttpd/
9. /srv/www/lighttpd/rutorrent/conf.d/config.php:
Code: [Select]
$scgi_port = 0;
$scgi_host = "unix:///tmp/php-fastcgi-1.socket";
$XMLRPCMountPoint = "/srv/www/lighttpd/rutorrent/RPC2";
10. chown -R david:david /srv/
chmod -R 755 /srv/
From rutorrent directory:
find share/ -type d -exec chmod 777 {} \;
find share/ -type f -exec chmod 666 {} \;

I can successfully open the .php and .html test files in my browser. No plugins for rutorrent currently installed.
System: CentOS 6.3 x64
lighttpd 1.4.28
php 5.3.3
libtorrent 0.12.9
rtorrent 0.8.9
rutorrent (latest revision from svn) 2096
Thank you for your time.
 

jith45

Member
May 25, 2018
960
0
16
Rutorrent wiki talks only about scgi settings, does it mean i can't use fastcgi? As I understand it, they should be both reimplementations of the cgi protocol...
 

jith45

Member
May 25, 2018
960
0
16
"OK. What this? -"
The same as I posted in the first post:
Code:
Bad response from server: (404 [error,list]) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 - Not Found</title> </head> <body> <h1>404 - Not Found</h1> </body> </html>"You really have working URL https://serverip:61359/srv/www/lighttpd/rutorrent/RPC2 ?"
No I haven't cry.gif, i get 404 - Not Found. I don't even know what it is, but I've read somewhere the rpc mount point should be somewhere in my webspace. What else shall i put into the XMLRPCMountPoint then?
I'll try to look into the lighttpd/conf in the meantime.
 

das329717

Member
May 25, 2018
928
0
16
Quote
I don't even know what it is​


Then for which reason you change this variable?

Yet once. Don't touch anything. Use ruTorrent's plugin 'rpc'.
 

jith45

Member
May 25, 2018
960
0
16
I changed the variable because I had problems with rutorrent from the beginning and couldn't ask at the forum since the "New Topic" button was disabled so I had to help myself somehow and try various things and because rutorrent wiki says "XMLRPC Mount Point - This defaults to /RPC2 but can be set to anything inside your webspace.", I left it this way.
Anyways I've returned that variable to the default value "/RPC2", disabled fastcgi module, enabled scgi and added this section to the /etc/lighttpd/conf.d/scgi.conf:
Code:
scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"socket" => "/tmp/php-fastcgi-1.socket ",
"check-local" => "disable",
"disable-time" => 0, # don't disable scgi if connection fails
)
)
)
Now after lighttpd restart when I point my browser to https://serverip:61359/rutorrent i get these 2 errors:
Code:
Bad response from server: (403 [error,getplugins]) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>403 - Forbidden</title> </head> <body> <h1>403 - Forbidden</h1> </body> </html>
Bad response from server: (403 [error,getuisettings]) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>403 - Forbidden</title> </head> <body> <h1>403 - Forbidden</h1> </body> </html>When pointing to https://serverip:61359/RPC2 i get nothing - no error, no text, just a blank white page.
When pointing to the https://serverip:61359/index.php test file i get 403 - Forbidden.
https://serverip:61359/index.html still works.
 

jith45

Member
May 25, 2018
960
0
16
I tried the rpc plugin, unfortunately there's not much info on the setup of the plugin at the rutorrent wiki, only "If you use one of these plguins, do not set up SCGI via the webserver, if you do it defeats the purpose". So I've disabled the scgi module in /etc/lighttpd/modules.conf and restarted lighttpd server, but i still get the same errors from my previous post.
 

jith45

Member
May 25, 2018
960
0
16
ok, i've made it work when scgi is disabled and fastcgi enabled. Now rutorrent works without any error with either rpc or httprpc plugin. But once I disable fastcgi it stops working, which is strange because rutorrent wiki doesn't mention anything about fastcgi setup. Now is this settings correct even though? If yes, I'll mark the topic solved