I am still not getting any luck getting lighttpd installed and started
(properly).
I can determine that webrick is running fine in the console:
[root@test admin]# script/server webrick -p 3000
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2006-09-07 09:12:04] INFO WEBrick 1.3.1
[2006-09-07 09:12:04] INFO ruby 1.8.4 (2005-12-24) [i386-linux]
[2006-09-07 09:12:04] INFO WEBrick::HTTPServer#start: pid=21344
port=3000
however, when I try to start lighttpd I get the following:
[root@test admin]# service lighttpd start
Starting lighttpd: [ OK ]
[root@test admin]# service lighttpd status
lighttpd dead but pid file exists
Worse yet, I can find nothing that details the meaning of “lighttpd
dead but pin file exists”. Does anyone know why lighttpd is failing in
this way? The documentation on ROR says that perhaps the conf has some
paths incorrect. I’ve checked and double checked. Included herein is
the complete lighttpd.conf file. Perhaps you guys can see what I’m
not.
The app is running in /home/www/web4/web/admin, where admin is the
rails app. (using vhosts here).
The one thing I’m not able to see is the error logs for lighttpd, which
contain no info.
Would love to get started with ROR here but need to get the damn
thing running. Dan, centOS has been quite nice for a RHED clone.
We’re using as a test box to mirror our prod box and its gone quite
smooth.
-l
p.s. here is my lighttpd.conf
lighttpd configuration file
############ Options you really have to take care of
####################
modules to load
server.modules = (
“mod_rewrite”,
“mod_access”,
“mod_fastcgi”,
“mod_simple_vhost”,
“mod_accesslog” )
a static document-root, for virtual-hosting take look at the
server.virtual-* options
server.document-root = “/home/www/web4/web/admin/public/”
where to send error-messages to
Server.errorlog = “/var/log/lighttpd/error_log.log”
server.errorlog =
“/home/www/web4/web/admin/log/lighttpd_error.log”
files to check for if …/ is requested
server.indexfiles = ( “index.php”, “index.html”,
“index.htm”, “default.htm” )
mimetype mapping
mimetype.assign = (
“.rpm” => “application/x-rpm”,
“.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 = “/var/log/lighttpd/access_log.log”
accesslog.filename =
“/home/www/web4/web/admin/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
$HTTP[“url”] =~ “.pdf$” {
server.range-requests = “disable”
}
######### Options that are good to be but not neccesary to be changed
#######
bind to port (default: 80)
server.port = 8080
bind to localhost (default: all interfaces)
Server.bind = “grisu.home.kneschke.de”
Server.bind = “0.0.0.0”
error-handler for status 404
Server.error-handler-404 = “/error-handler.html”
Server.error-handler-404 = “/error-handler.php”
NOTE: here I went with documentation instead of where its located
Server.error-handler-404 =
“/home/www/web4/web/admin/public/dispatch.fcgi”
server.error-handler-404 = “/dispatch.fcgi”
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/”
simple-vhost.server-root = “/home/www/web4/www/”
simple-vhost.default-host = “test.domain.com”
simple-vhost.document-root = “/admin/”
Format: .html
→ …/status-404.html for ‘File not found’
Server.errorfile-prefix =
“/home/weigon/projects/lighttpd/doc/status-”
virtual directory listings
Server.dir-listing = “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 (default: don’t care)
server.username = “lighttpd”
change uid to (default: don’t care)
server.groupname = “lighttpd”
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.server = (
“.fcgi” => (
“rails” => (
“socket” => “/tmp/lighttpd-fcgi.socket-0”,
“bin-path” =>
“/home/www/web4/web/admin/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” =>
“production” ),
“min-procs” => 2,
“max-procs” => 2
)
)
)
CGI module
#cgi.assign = ( “.pl” => “/usr/bin/perl”,
“.cgi” => “/usr/bin/perl” )
SSL engine
#ssl.engine = “enable”
#ssl.pemfile = “server.pem”
status module
#status.status-url = “/server-status”
#status.config-url = “/server-config”