Project

General

Profile

lighttpd won't start after upgrade.

Added by dadoupy about 15 years ago

Hello,

I did an ipkg upgrade lighttpd, but now lighhtpd wont start. When the question was asked to overwrite the lighttpd.conf i said no (default). Afterward i did an ipkg install lighttpd -reinstall and the lighttpd.conf is overwritten. I checked the difference and changed the .conf accordingly. But the problems is still the same. I get this messega:
[admin@WL500GP root]$ /opt/etc/init.d/S80lighttpd
Starting web server: lighttpd
Duplicate config variable in conditional 0 global: fastcgi.server
2009-11-08 16:15:25: (configfile.c.901) source: cat /opt/etc/lighttpd/conf.d/*.conf line: 15 pos: 1 parser failed somehow near here: (EOL)
2009-11-08 16:15:25: (configfile.c.901) source: /opt/etc/lighttpd/lighttpd.conf line: 336 pos: 1 parser failed somehow near here: (EOL)

this is my config:

# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf 2976 2006-03-06 23:31:44Z bzhou $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
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_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        = "/mnt/" 

## 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" )

## 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", ".sqlite" )

$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", ".cgi")

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

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

## bind to localhost (default: all interfaces)
#server.bind                = "my.dns.org" 

## 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            = "nobody" 

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

#### 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
## this works in headstart raas
#fastcgi.server             = ( ".php" =>
#                               ((
#                  "host" => "192.168.1.1",
#                  "port" => 1026,
#                               ))
#                            )
#

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" 
                                 )
                               )
                            )

##### fastcgi settings for hellanzb/zussaweb ??
#fastcgi.server             = ( ".php" =>
#                               ( "localhost" =>
#                                 (
#                                   "socket" => 
#"/tmp/php-fastcgi.socket",
#                                   "bin-path" => "/opt/bin/php-fcgi" 
#                                 )
#                               )
#                            )
#

#### CGI module
cgi.assign                 = ( ".cgi" => "/bin/sh" )

#### SSL engine
#ssl.engine                 = "enable" 
#ssl.pemfile                = "/opt/etc/lighttpd/lighttpd.pem" 

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

#### auth module
## read authentication.txt for more info
#auth.backend               = "plain" 
#auth.backend.plain.userfile = "lighttpd.user" 
#auth.backend.plain.groupfile = "lighttpd.group" 

#auth.backend.ldap.hostname = "localhost" 
#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com" 
#auth.backend.ldap.filter   = "(uid=$)" 

#auth.require               = ( "/server-status" =>
#                               (
#                                 "method"  => "digest",
#                                 "realm"   => "download archiv",
#                                 "require" => "user=jan" 
#                               ),
#                               "/server-config" =>
#                               (
#                                 "method"  => "digest",
#                                 "realm"   => "download archiv",
#                                 "require" => "valid-user" 
#                               )
#                             )
auth.backend               = "plain" 
auth.backend.plain.userfile = "/opt/etc/lighttpd/.lighttpdpassword" 
auth.require               = ( "/protected/" =>
                               (
                                 "method"  => "basic",
                                 "realm"   => "Enter Password",
                                 "require" => "user=admin" 
                               ),
                               "/cgi-bin/" =>
                               (
                                 "method"  => "basic",
                                 "realm"   => "Enter Password",
                                 "require" => "user=admin" 
                               ),
                               "/AIOCP/admin/phpMyAdmin/" =>
                               (
                                 "method"  => "basic",
                                 "realm"   => "Enter Password",
                                 "require" => "user=admin" 
                               )

                        )

#### url handling modules (rewrite, redirect, access)
#url.rewrite                = ( "^/$"             => "/server-status" )
#url.redirect               = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www\.(.*)" {
#  url.redirect            = ( "^/(.*)" => "http://%1/$1" )
#}

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern        = "/home/storage/dev/www/%3/htdocs/" 

#### expire module
#expire.url                 = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### ssi
#ssi.extension              = ( ".shtml" )

#### rrdtool
#rrdtool.binary             = "/opt/bin/rrdtool" 
#rrdtool.db-name            = "/var/www/lighttpd.rrd" 

#### setenv
#setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" 
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/" 
# trigger-before-download.download-url = "^/download/" 
# trigger-before-download.deny-url = "http://127.0.0.1/index.html" 
# trigger-before-download.trigger-timeout = 10

## for mod_cml
## don't forget to add index.cml to server.indexfiles
# cml.extension               = ".cml" 
# cml.memcache-hosts          = ( "127.0.0.1:11211" )

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar" 
#bar = 1
#var.mystring = "foo" 

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com" 
#server.name = "www." + mystring + var.bar + ".com" 
server.name = "NAS" 
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" 
#include "lighttpd-inc.conf" 

#### include_shell
#include_shell "echo var.a=1" 
## the above is same as:
#var.a=1
---

[admin@WL500GP root]$ ps -A
  PID TTY          TIME CMD
    1 ?        00:00:01 init
    2 ?        00:00:00 keventd
    3 ?        00:00:00 ksoftirqd_CPU0
    4 ?        00:00:00 kswapd
    5 ?        00:00:00 bdflush
    6 ?        00:00:00 kupdated
    7 ?        00:00:00 mtdblockd
   62 ?        00:00:00 telnetd
   67 ?        00:00:00 httpd
   69 ?        00:00:00 syslogd
   71 ?        00:00:00 klogd
   72 ?        00:00:00 snmpd
   73 ?        00:00:00 nas
   75 ?        00:00:00 khubd
   84 ?        00:00:00 lpd
   86 ?        00:00:00 p910nd
   89 ?        00:00:00 waveservermain
   93 ?        00:00:00 usb-storage-0
   94 ?        00:00:00 scsi_eh_0
   96 ?        00:00:00 infosvr
   97 ?        00:00:00 watchdog
   99 ?        00:00:00 ntp
  108 ?        00:00:00 dropbear
  109 ?        00:00:00 dropbear
  127 ?        00:00:00 kjournald
  128 ?        00:00:00 kjournald
  142 ?        00:00:00 syslog-ng
  148 ?        00:00:00 cron
  155 ?        00:00:00 xinetd
  159 ?        00:00:00 php-fcgi
  166 ?        00:00:00 proftpd
  184 ?        00:00:00 mysqld_safe
  264 ?        00:00:00 mysqld
  265 ?        00:00:00 php-fcgi
  266 ?        00:00:00 mysqld
  267 ?        00:00:00 mysqld
  287 ?        00:00:00 smbd
  289 ?        00:00:00 nmbd
  305 ?        00:00:00 dropbear
  306 pts/0    00:00:00 sh
  318 pts/0    00:00:00 ps
---
[admin@WL500GP root]$ ipkg list_installed
bzip2 - 1.0.5-2 - Very high-quality data compression program
c-ares - 1.6.0-1 - C library that performs DNS requests and name resolves asynchronously
coreutils - 7.5-1 - Bunch of heavyweight *nix core utilities
cron - 4.1-7 - Standard vixie cron, with cron.d addition
cyrus-sasl-libs - 2.1.22-2 - Provides client or server side authentication (see RFC 2222).
diffutils - 2.8.1-6 - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files
e2fslibs - 1.41.9-1 - Ext2 Filesystem Libraries
e2fsprogs - 1.41.9-1 - Ext2 Filesystem Utilities
eventlog - 0.2.7-1 - library needed by syslog-ng
expat - 2.0.1-1 - XML Parser library
findutils - 4.2.32-1 - File finding utilities
fontconfig - 2.5.0-0 - Font configuration library
freetype - 2.3.6-1 - Free truetype library
gconv-modules - 2.2.5-7 - Provides gconv modules missing from the firmware.  These are used by glibc iconv() implementation.
gdbm - 1.8.3-2 - GNU dbm is a set of database routines that use extensible hashing. It works similar to the standard UNIX dbm routines.
glib - 2.20.4-1 - The GLib library of C routines.
gnuplot - 4.2.4-2 - Command-line driven interactive data and function plotting utility
groff - 1.19.2-2 - front-end for the groff document formatting system
hdparm - 9.27-2 - Linux hard drive parameter utility
ipkg-opt - 0.99.163-10 - The Itsy Package Manager
less - 436-1 - Less file browser
libbt - 1.05-5 - a C library implementing the core BitTorrent protocol
libcurl - 7.19.7-1 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
libdb - 4.2.52-3 - Berkeley DB Libraries
libevent - 1.4.11-1 - libevent to implement an event loop
libgd - 2.0.35-4 - An ANSI C library for the dynamic creation of images
libjpeg - 6b-3 - collection of jpeg tools
libmemcache - 1.4.0.rc2-3 - The C API for memcached.
libpng - 1.2.40-1 - Portable Network Graphics Libraries
libuclibc++ - 0.2.2-8 - C++ standard library designed for use in embedded systems
libxml2 - 2.7.6-1 - Libxml2 is the XML C parser and toolkit developed for the Gnome project.
libxslt - 1.1.26-1 - An XML Stylesheet processor based on libxml2
lighttpd - 1.4.24-1 - A fast webserver with minimal memory footprint.
logrotate - 3.7.5-2 - Rotates, compresses, removes and mails system log files.
lua - 5.1.4-2 - Lua is a powerful light-weight programming language designed for extending applications.
make - 3.81-2 - examines files and runs commands necessary for compilation
man - 1.6f-1 - unix manual page reader
man-pages - 2.76-1 - unix manual pages
mc - 4.6.2-1 - Midnight Commander File Manager
memcached - 1.3.0-1 - memcached is a high-performance, distributed memory object caching system.
mysql - 4.1.22-3 - Popular free SQL database system
nano - 2.1.10-1 - A pico like editor
ncurses - 5.7-1 - NCurses libraries
ncursesw - 5.7-1 - NCurses libraries with wide char support.
openldap-libs - 2.3.43-1 - Open Lightweight Directory Access Protocol
openssl - 0.9.7m-5 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
par2cmdline - 0.4-4 - tool to apply the data-recovery capability concepts of RAID-like systems to the posting & recovery of multi-part archives on Us
pcre - 8.00-1 - Perl-compatible regular expression library
php - 5.2.11-1 - The php scripting language
php-fcgi - 5.2.11-3 - The php scripting language, built as an fcgi module
php-gd - 5.2.11-1 - libgd extension for php
php-mbstring - 5.2.11-1 - mbstring extension for php
php-mysql - 5.2.11-1 - mysql extension for php
popt - 1.15-1 - A C library for parsing command line parameters.
procps - 3.2.8-1 - PROCPS System Utilities
proftpd - 1.3.2b-1 - Highly configurable FTP server with SSL-TLS
py25-hellanzb - 0.13-2 - Hellanzb is a Python application designed for *nix environments that retrieves nzb files and fully processes them
py25-twisted - 8.2.0-1 - A networking engine written in Python.
py25-yenc - 0.3-1 - A module that provides only raw yEnc encoding/decoding with builtin crc32 calculation (C implementation).
py25-zope-interface - 3.5.0-1 - A separate distribution of the zope.interface package used in Zope 3, along with the packages it depends on.
python25 - 2.5.4-2 - Python is an interpreted, interactive, object-oriented programming language.
readline - 6.0-1 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
samba2 - 2.2.12-1 - Lightweight Samba suite provides file and print services to SMB/CIFS clients.
screen - 4.0.3-2 - A screen manager that supports multiple logins on single terminal
slang - 2.1.4-1 - S-Lang is a multi-platform library designed to allow a developer to create robust multi-platform software.
spawn-fcgi - 1.6.3-1 - spawn-fcgi is used to spawn fastcgi applications
sqlite - 3.6.20-1 - SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
syslog-ng - 2.0.9-2 - Syslog replacement logging on behalf of remote hosts
termcap - 1.3.1-2 - Terminal emulation library
uclibc-opt - 0.9.28-13 - micro C library for embedded Linux systems
unrar - 3.9.6-1 - unrar is an application that can decompress files and archives created using the RAR compression scheme
unzip - 6.0-2 - A (de)compression library for the ZIP format
wget - 1.12-2 - A network utility to retrieve files from the Web
xinetd - 2.3.14-9 - Highly configurable, modular and secure inetd
zlib - 1.2.3-3 - zlib is a library implementing the 'deflate' compression system.
Successfully terminated.

I don't know what 'x'nix runs on a asus wl500g, so can't help u with that.


Replies (12)

RE: lighttpd won't start after upgrade. - Added by spaam about 15 years ago

are you sure that is the right config? i dont see any conf.d in it. according to the error msg there should be something about conf.d in it .

RE: lighttpd won't start after upgrade. - Added by dadoupy about 15 years ago

I have 2 files in the conf.d and they are not changed:
01-default.conf is empty and 10-php-fcgi.conf:

server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" =>
                   ( "localhost" =>
                     ( "socket" => "/tmp/php-fcgi.sock",
                       "bin-path" => "/opt/bin/php-fcgi",
                       "max-procs" => 1,
                       "bin-environment" =>
                         ( "PHP_FCGI_CHILDREN" => "2",
                           "PHP_FCGI_MAX_REQUESTS" => "1000" )
                     )
                   )
                 )

RE: lighttpd won't start after upgrade. - Added by icy about 15 years ago

And you already have it in the main config so it's there twice, just like the error message told you.

RE: lighttpd won't start after upgrade. - Added by dadoupy about 15 years ago

Removed the 10-php-fcgi.conf.

Now I don't get an error.
[admin@WL500GP root]$ /opt/etc/init.d/S80lighttpd
Starting web server: lighttpd
[admin@WL500GP root]$

But no lighttpd running when using ps -A.

RE: lighttpd won't start after upgrade. - Added by icy about 15 years ago

lighttpd -Df /etc/lighttpd/lighttpd.conf

RE: lighttpd won't start after upgrade. - Added by dadoupy about 15 years ago

[admin@WL500GP root]$ lighttpd -Df /opt/etc/lighttpd/lighttpd.conf
fdevent_linux_sysepoll.c.131: epoll_create failed (Function not implemented), try to set server.event-handler = "poll" or "select"
fdevent.c.47: event-handler linux-sysepoll failed, try to set server.event-handler = "poll" or "select"
[admin@WL500GP root]$

RE: lighttpd won't start after upgrade. - Added by dadoupy about 15 years ago

error.log:
2009-11-08 18:15:26: (log.c.166) server started
2009-11-08 18:15:26: (server.c.1105) fdevent_init failed

RE: lighttpd won't start after upgrade. - Added by spaam about 15 years ago

change the event handler to poll or select like that error msg say :)

RE: lighttpd won't start after upgrade. - Added by dadoupy about 15 years ago

When use "poll" the server runs but my command prompt won't come back. I had to close the session and start a new one.
Does this say anything about "poll", should i use "select" instead? I ask this because I don't know what these options do.

RE: lighttpd won't start after upgrade. - Added by stbuehler about 15 years ago

Perhaps you should have looked what the "-D" option does...
If your system provides "poll" (it probably does), don't use "select". And if you care about performance upgrade your kernel to get "epoll" support.

RE: lighttpd won't start after upgrade. - Added by dadoupy about 15 years ago

My server is now running with "select" and runs smoothly. I'll try "epoll", because i only have an 266Mhz proc.

Thanx for all the info. My server is running again and with the upgrade more safely.
The "lighttpd -Df /opt/etc/lighttpd/lighttpd.conf" made the difference. It told me wath was wrong. I'm so happy, thanx again for helping a newbie!

    (1-12/12)