[SOLVED][RuTorrent + Lighttpd] Bad Response from server (403) - Forbidden

simur612

Member
May 25, 2018
879
0
16
hi all!

I'm trying to setup lighttpd & rutorrent 2.3 & rTorrent 0.8.6/0.12.6 on debian squeeze.

When accessing the webinterface I only get this in the logger:
Quote
[26.07.2011 12:59:59] WebUI started.
[26.07.2011 13:00:00] 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>
[26.07.2011 13:00:00] 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>​


Here's my config files:


lighttpd.conf:
Quote
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
# "mod_fastcgi",
"mod_scgi"
)
scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5001,
"check-local" => "disable"
)
)
)​

conf.php:
Quote
$scgi_port = 5001;
$scgi_host = "127.0.0.1";

$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!​

.rtorrent.rc:
Quote
scgi_port = 127.0.0.1:5001​


Only posted the relevant parts, or are there others?

already set up permissions properly like this i.e.:
chown www-data:www-data -R /var/www

informational output:
Quote
$ php -v
PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cli) (built: Mar 18 2011 20:10:12)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
$ php-cgi -v
PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cgi-fcgi) (built: Mar 18 2011 20:10:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH​



any help?

thanks in advance!
 

randac56

Member
May 25, 2018
915
0
16
In lighttpd.conf add module "mod_fastcgi" and configure section fastcgi.server properly.
For example, my config:
Code:
server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" =>
( "localhost" =>
(
"min-procs" => 1,
"max-procs" => 1,
"max-load-per-proc" => 4,
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/opt/bin/php-fcgi"
)
)
)

Or configure cgi, e.q. something like

Code:
cgi.assign = ( ".php" => "/bin/php-cgi" )
 

simur612

Member
May 25, 2018
879
0
16
pardon, I missed adding that I already have it enabled via conf-enabled config file folder.

I tried adding
Quote
cgi.assign = ( ".php" => "/bin/php-cgi" )​

but the problem is not that the php parser isn't executed!
it must be somewhere else...

cheers

edit:
note, I just realized that I'm getting the message even if rtorrent is not running, so.... lighttpd issue i figure :-S
 

simur612

Member
May 25, 2018
879
0
16
solved!
was indeed php not working correctly 0:)

added:
Quote
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)​