Lighttpd always stops when logging in to rutorrent

shwetha17

Member
May 24, 2018
785
0
16
I have rtorrent installed and worked fine on my TeraStation pro II using console, I was trying to install rutorrent so I can use web browswer, but whenever I browse to http://my_IP:81/rtorrent, lighttpd crashes.

Here is my lighttpd.conf :

server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_cml",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
"mod_scgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/opt/share/www/"

## where to send error-messages to
server.errorlog = "/opt/var/log/lighttpd/error.log"

# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"lighttpd/index.html" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar"
)

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"

#### accesslog module
accesslog.filename = "/opt/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}

##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port = 81

## bind to localhost (default: all interfaces)
#server.bind = "grisu.home.kneschke.de"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"


###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
#simple-vhost.default-host = "grisu.home.kneschke.de"
#simple-vhost.document-root = "/pages/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"

## virtual directory listings
#dir-listing.activate = "enable"

## enable debugging
debug.log-request-header = "enable"
debug.log-response-header = "enable"
debug.log-request-handling = "enable"
debug.log-file-not-found = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to <uid> (default: don't care)
#server.username = "root"

## change uid to <uid> (default: don't care)
#server.groupname = "root"

#### compress module
#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
#compress.filetype = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )

#### fastcgi module
## read fastcgi.txt for more info
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/tmp/php-fcgi.sock",
# "bin-path" => "/opt/bin/php-fcgi",
# "bin-environment" => (
# "PHP_FCGI_MAX_REQUESTS" => "4000"
# )
# )
# )
# )

#### CGI module
#cgi.assign = ( ".pl" => "/opt/bin/perl",
# ".cgi" => "/opt/bin/perl" )
#

#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "server.pem"
#ssl.ca-file = "ca.crt"
#ssl.verifyclient.activate = "enable"
#ssl.verifyclient.enforce = "enable"
#ssl.verifyclient.depth = 1

#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"

scgi.server = (
"/RPC2" =>
("127.0.0.1" =>
("host" => "127.0.0.1",
"port" => "5000",
"check-local" => "disable",
# "disable-time" => 0
)))


Thank you very much
 

jith45

Member
May 25, 2018
960
0
16
is there anything in the lighttpd.error.log?

i'm betting it's a problem with php or fcgi
 

jith45

Member
May 25, 2018
960
0
16
infact,. looking at iti'm sure of it.

you need to enable fastcgi and uncomment this part.

Code:
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/tmp/php-fcgi.sock",
# "bin-path" => "/opt/bin/php-fcgi",
# "bin-environment" => (
# "PHP_FCGI_MAX_REQUESTS" => "4000"
# )
# )
# )
# )


next time check the logs.
i'm almost possive you'll see why it crashed. anyways, be sure when you do this your web user has the permissions to create the sockets...and you actually HAVE php, if you used the SUNWphp52 package you may need to change the path to /usr/php/bin/ instead of /opt/bin/
 

somus1735

Member
May 25, 2018
833
0
16
Quote
infact,. looking at iti'm sure of it.

you need to enable fastcgi and uncomment this part.

Code:
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/tmp/php-fcgi.sock",
# "bin-path" => "/opt/bin/php-fcgi",
# "bin-environment" => (
# "PHP_FCGI_MAX_REQUESTS" => "4000"
# )
# )
# )
# )


next time check the logs.
i'm almost possive you'll see why it crashed. anyways, be sure when you do this your web user has the permissions to create the sockets...and you actually HAVE php, if you used the SUNWphp52 package you may need to change the path to /usr/php/bin/ instead of /opt/bin/​


Hello lazycat, Wonslung is correct. I use lighty and I use the mod_fastcgi. As Wonslung says , simply uncomment the fastcgi module and away you go smiley.gif

PS dont forget to add this to the end of your php.ini file:
Code:
cgi.fix_pathinfo = 1
 

shwetha17

Member
May 24, 2018
785
0
16
Thank you, wonslung and Stubs,

I have made my box new from scratch and install everything from beginning to debug the error

I enabled fastcgi and uncomment the part associated with fastcgi

I added cgi.fix_pathinfo = 1 to the last line of php.ini

Quote
i'm almost possive you'll see why it crashed. anyways, be sure when you do this your web user has the permissions to create the sockets...and you actually HAVE php, if you used the SUNWphp52 package you may need to change the path to /usr/php/bin/ instead of /opt/bin/​


About this part, i'm not sure to change the path in what file. I have php php-fcgi php-xmlrpc xmlrpc-c installed besides lighttpd. Is there something else that I miss here?

And I attach error.log :

Quote
010-02-22 06:21:48: (log.c.166) server started
2010-02-22 06:22:28: (server.c.1503) server stopped by UID = 0 PID = 15130
2010-02-22 06:55:01: (log.c.166) server started
2010-02-22 06:55:08: (network.c.39) strange event for server socket 4 0
2010-02-22 06:56:04: (log.c.166) server started
2010-02-22 06:56:13: (network.c.39) strange event for server socket 4 0​


Thank you again for your help
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
Hi there lazy cat, make sure you have lighttpd-fastcgi installed as well wink.gif

Stubs​


Unfortunately, I saw only these two packages in optware:

Code:
mod-fastcgi - 2.4.2-3 - mod_fastcgi is an Apache module providing language indep endent, scalable, open extension to CGI.
spawn-fcgi - 1.6.3-1 - spawn-fcgi is used to spawn fastcgi applications
i thought that enabling mod_fastcgi in lighttpd.conf meaning fastcgi is already active
 

jith45

Member
May 25, 2018
960
0
16
Quote
Quote
Hi there lazy cat, make sure you have lighttpd-fastcgi installed as well wink.gif

Stubs​

Unfortunately, I saw only these two packages in optware:

Code:
mod-fastcgi - 2.4.2-3 - mod_fastcgi is an Apache module providing language indep endent, scalable, open extension to CGI.
spawn-fcgi - 1.6.3-1 - spawn-fcgi is used to spawn fastcgi applications
i thought that enabling mod_fastcgi in lighttpd.conf meaning fastcgi is already active




stubs is very much mistaken. So long as you have php built with fast cgi support (it is on solaris via SUNWphp52) then lighttpd has the fastcgi code built in.
 

shwetha17

Member
May 24, 2018
785
0
16
Quot
Quot
Quote
Hi there lazy cat, make sure you have lighttpd-fastcgi installed as well wink.gif

Stubs​

Unfortunately, I saw only these two packages in optware:

Code:
mod-fastcgi - 2.4.2-3 - mod_fastcgi is an Apache module providing language indep endent, scalable, open extension to CGI.
spawn-fcgi - 1.6.3-1 - spawn-fcgi is used to spawn fastcgi applications
i thought that enabling mod_fastcgi in lighttpd.conf meaning fastcgi is already active




stubs is very much mistaken. So long as you have php built with fast cgi support (it is on solaris via SUNWphp52) then lighttpd has the fastcgi code built in.


I have php and php-fcgi installed, do I need to adjust anything in the configuration files?
 

jith45

Member
May 25, 2018
960
0
16
only with what i told you in the first place (uncomment the php section and set it to the current binary)
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
only with what i told you in the first place (uncomment the php section and set it to the current binary)


Yes, i already uncomment the php section and my php-fcgi is actually in /opt/bin

Lighttpd still stops whenever i browse to rutorrent.

error.lg

Code:
2010-02-22 06:21:48: (log.c.166) server started
2010-02-22 06:22:28: (server.c.1503) server stopped by UID = 0 PID = 15130
2010-02-22 06:55:01: (log.c.166) server started
2010-02-22 06:55:08: (network.c.39) strange event for server socket 4 0
2010-02-22 06:56:04: (log.c.166) server started
2010-02-22 06:56:13: (network.c.39) strange event for server socket 4 0
2010-02-22 07:07:24: (log.c.166) server started
2010-02-22 07:07:27: (network.c.39) strange event for server socket 4 0
2010-02-22 14:56:23: (log.c.166) server started
2010-02-22 14:56:56: (network.c.39) strange event for server socket 4 0
 

shwetha17

Member
May 24, 2018
785
0
16
It seems that my lighttpd and php are not working with each other. I just have tested with a small script

Code:
<?php
phpinfo();
?>
the page shows my php settings but after I hit refresh, lighttpd is crashed

The log keeps saying
Code:
2010-02-22 16:40:59: (network.c.39) strange event for server socket 4 0
and nothing else.

Could someone helps me with this problem?
 

jith45

Member
May 25, 2018
960
0
16
dude, i've already explained it.

secondly, this is not the forum for your distro, this is not the forum for lighttpd. It's not even the forum for rtorrent. It's for rutorrent.

I'm not saying we won't try to help you, what i'm saying is you are posting a non-rutorrent issue.

My suggestion is to learn how to set up a webserver. Lighttpd is one of the hardest ones by config settings of ANY webserver.

the easiest i've come across is cherokee.

in order to get it working you need to uncomment the section i mentioned originally and change the binary path to the one which matcches the location of php on your system. you need to make sure the dir where the socket is formed has write priveleges to the user opening the socket, and you need to enable fastcgi support in the modules section.

If all of that fails then you need to seek help in the PROPER forum.
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
dude, i've already explained it.

secondly, this is not the forum for your distro, this is not the forum for lighttpd. It's not even the forum for rtorrent. It's for rutorrent.

I'm not saying we won't try to help you, what i'm saying is you are posting a non-rutorrent issue.

My suggestion is to learn how to set up a webserver. Lighttpd is one of the hardest ones by config settings of ANY webserver.

the easiest i've come across is cherokee.

in order to get it working you need to uncomment the section i mentioned originally and change the binary path to the one which matcches the location of php on your system. you need to make sure the dir where the socket is formed has write priveleges to the user opening the socket, and you need to enable fastcgi support in the modules section.

If all of that fails then you need to seek help in the PROPER forum.


Yes, after digging around I figured out it's not rutorrent issue since I did all of what you said. So it must be problem with lighttpd and php installation for my box.

Thanks anyway!
 

jith45

Member
May 25, 2018
960
0
16
this is a sun box right?

on my solaris box i use SUNWphp52 and a self built cherokee install. Cherokee is easy to build with either GCC or Sun Studio and it is a TON easier to configure than lighttpd. It's also faster than lighttpd.
 

das329717

Member
May 25, 2018
928
0
16
Hi there again wink.gif,

I apologise for my error, I should have read which distro you were using, and wonslungs recommendation of using cherokee is spot on. The gui is what makes cherokee easier to use and understand.
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
this is a sun box right?

on my solaris box i use SUNWphp52 and a self built cherokee install. Cherokee is easy to build with either GCC or Sun Studio and it is a TON easier to configure than lighttpd. It's also faster than lighttpd.


Unfortunately, it's not a sun box. I was also trying to install cherokee on my box, but it seems it's lacking some files in optware that makes cherokee unable to run.
 

jith45

Member
May 25, 2018
960
0
16
what os are you running? i thought you said it was solaris.


edit:

my bad, went back and reread it, for some reason i thought you were on a solaris box. In that case, what os does this machine use? we can get it working i'm sure.



we may end up needing to cross compile something if it's a nas box without a standard distro...
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
what os are you running? i thought you said it was solaris.


edit:

my bad, went back and reread it, for some reason i thought you were on a solaris box. In that case, what os does this machine use? we can get it working i'm sure.



we may end up needing to cross compile something if it's a nas box without a standard distro...​


It's a nas box, terastation pro II , so I think it's not a standard distro.

If you could help me install cherokee on it, I would really appreciate
 

jith45

Member
May 25, 2018
960
0
16
does it have the ability to build software?

does it have gcc on it? if so we can compile cherokee.