• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

Lighttpd will nicht starten

ties0

New Member
Nabend zusammen,

also ich wollte heute von apache2 auf lighttpd umsteigen. Habe auch vorher alles geübt. Zum einen an einem Rechner hier zuhause und mit einem mini vServer. Beide hatten ein Ubuntu 8.10 minimal Image.

Hab dann bei meinem Hoster den Auftrag gegeben ein Minimal Image zu installieren. War dann auch recht schnell getan. Als ich dann aber auf den Server schaute stellte ich fest das dort Apache2 installiert war und weiteres. So wirklich bin bzw war ich jetzt nicht auf das Ganze vorbereitet. Dachte ich mir setzte den Apache auf einen anderen Port. Hab ich dann auch gemacht.

Habe dann lighttpd mit

PHP:
aptitude install lighttpd lighttpd-doc

installiert. Lighttpd wird auch bei der installation als gestartet angezeigt.

Bei netstat -nlp erhalte ich dann aber diese Meldung:

PHP:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      15850/sendmail: MTA
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      10005/mysqld
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      15850/sendmail: MTA
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      29719/apache2
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      15788/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      15788/sshd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     39385381 15850/sendmail: MTA /var/run/sendmail/mta/smcontrol
unix  2      [ ACC ]     STREAM     LISTENING     39487371 10005/mysqld        /var/run/mysqld/mysqld.sock

Also läuft nicht...

Meine lighttpd.conf sieht so aus. Die läuft aber wunderbar auf 2 Servern... Allerdings mit dem Minimal Image von Ubuntu. Laut des Hosteres sei das das Minimal Image was von VZ mit dabei sei.

PHP:
# Debian lighttpd configuration file
#

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

## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory

server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
            "mod_compress",
            "mod_rewrite",
#           "mod_redirect",
#           "mod_evhost",
#           "mod_usertrack",
#           "mod_rrdtool",
#           "mod_webdav",
            "mod_expire",
#           "mod_flv_streaming",
#           "mod_evasive"
            "mod_fastcgi"
)

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root       = "/var/www/"
alias.url = ( "/phpmyadmin" => "/usr/share/phpmyadmin" )

## where to upload files to, purged daily.
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )

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

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


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

#### accesslog module
accesslog.filename         = "/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" )

##
# 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 = ( ".php", ".pl", ".fcgi" )

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))

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

## Use ipv6 only if available.
include_shell "/usr/share/lighttpd/use-ipv6.pl"

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

## bind to localhost only (default: all interfaces)
## server.bind                = "localhost"

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

##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix    = "/var/www/"

## virtual directory listings
#dir-listing.encoding        = "utf-8"
#server.dir-listing          = "enable"

## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers  = "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            = "www-data"

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

#### compress module
compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ("text/plain", "text/html", "application/x-javascript", "text/css")

$HTTP["url"] =~ "(css|js|png|jpg|ico|gif)$" {
 expire.url = ( "" => "access 7 days" )
}

etag.use-inode = "enable"
etag.use-mtime = "enable"
etag.use-size = "enable"
static-file.etags = "enable"

#### url handling modules (rewrite, redirect, access)
# url.rewrite                 = ( "^/$"             => "/server-status" )
# url.redirect                = ( "^/wishlist/(.+)" => "http://www.123.org/$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")

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


#### 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"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

## load enabled configuration files,
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

#### handle Debian Policy Manual, Section 11.5. urls
## by default allow them only from localhost
## (This must come last due to #445459)
## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't
$HTTP["remoteip"] =~ "127.0.0.1" {
	alias.url += (
		"/doc/" => "/usr/share/doc/",
		"/images/" => "/usr/share/images/"
	)
	$HTTP["url"] =~ "^/doc/|^/images/" {
		dir-listing.activate = "enable"
	}

}

$HTTP["host"] =~ "^(www\.)?meinedomain\.net$" {
server.document-root = "/var/www/meinedomain/www/"
server.errorlog = "/var/www//meinedomain/logs/meinedomain_error.log"
accesslog.filename = "/var/www//meinedomain/logs/meinedomain_access.log"
}

else $HTTP["host"] =~ "(^|\.)subdomain\.meinedomain\.net$" {
server.document-root = "/var/www/meinedomain/subdomain/"
server.errorlog = "/var/www/meinedomain/logs/meinedomain_error.log"
accesslog.filename = "/var/www/meinedomain/logs/meinedomain_access.log"
}

Top sieht so aus:

PHP:
top - 02:40:54 up  2:59,  2 users,  load average: 0.00, 0.08, 0.18
Tasks:  28 total,   2 running,  26 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3044512k total,   250120k used,  2794392k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2020  716  608 S  0.0  0.0   0:00.20 init
 1722 root      15   0  8244 2764 2176 S  0.0  0.1   0:00.22 sshd
 1724 root      15   0  4704 1484 1076 S  0.0  0.0   0:00.02 sftp-server
 9827 root      19   0  2532 1188  988 S  0.0  0.0   0:00.03 mysqld_safe
10005 mysql     18   0  140m  17m 5340 S  0.0  0.6   0:00.92 mysqld
10007 root      23   0  1660  536  460 S  0.0  0.0   0:00.00 logger
11729 root      15   0  8060 2728 2188 S  0.0  0.1   0:00.23 sshd
11743 root      15   0  2856 1612 1248 S  0.0  0.1   0:00.05 bash
13904 root      16   0  8212 2776 2184 S  0.0  0.1   0:00.35 sshd
13959 root      15   0  4704 1500 1084 S  0.0  0.0   0:00.12 sftp-server
14118 root      15   0  8056 2732 2184 S  0.0  0.1   0:00.31 sshd
14124 root      15   0  4700 1412 1076 S  0.0  0.0   0:00.05 sftp-server
14135 root      15   0  8060 2780 2208 R  0.0  0.1   0:00.62 sshd
14143 root      15   0  2860 1612 1248 S  0.0  0.1   0:00.12 bash
15774 syslog    24   0  1892  696  544 S  0.0  0.0   0:00.08 syslogd
15788 root      21   0  5264 1076  688 S  0.0  0.0   0:00.03 sshd
15850 root      18   0  8636 1916  728 S  0.0  0.1   0:00.01 sendmail-mta

Lighttpd neustarten bringt da auch nichts, taucht nichts in netstat auf:

PHP:
 /etc/init.d/lighttpd restart
 * Stopping web server lighttpd                                          [ OK ]
 * Starting web server lighttpd                                          [ OK ]

Kann mir da jemand weiterhelfen?

War auf dieses komische MinimalImage leider nicht vorbereitet und nun stehe ich da, alles down derzeit :/
 
Last edited by a moderator:
Blöde Frage, aber wieso deinstallierst du den Apache nicht einfach, wenn du ihn eh nicht brauchst?!

Bekommst du denn eine Rückmeldung, wenn du z.B. per IP über den browser auf deinen Server gehst?

Was zeigt denn ein:
Code:
ps -Af | grep lighttpd
so Schönes an?

Gibts irgendwelche Logeinträge, die sonderbar sind?
 
Apache hatte ich gestern mal deinstalliert, hab dann aber was ausprobieren wollen, ob denn wenigstens der apache läuft und diesen wieder installiert. Apache deinstallieren hat da leider eben auch nichts gebracht.

Ich bekomme folgendes bei ps -Af | grep lighttpd:

PHP:
ps -Af | grep lighttpd
root     13856 13787  0 15:19 pts/0    00:00:00 grep lighttpd

Netstat zeigt weiterhin an, dass da nichts läuft auf dem Port:

PHP:
netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      15850/sendmail: MTA
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      10005/mysqld
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      15850/sendmail: MTA
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      29719/apache2
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      15788/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      15788/sshd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     39385381 15850/sendmail: MTA /var/run/sendmail/mta/smcontrol
unix  2      [ ACC ]     STREAM     LISTENING     39487371 10005/mysqld        /var/run/mysqld/mysqld.sock

Wenn ich über den Browser auf die Ip gehe erhalte ich im Mozilla:

PHP:
Failed to Connect
The connection was refused when attempting to contact IP.
 
Though the site seems valid, the browser was unable to establish a connection.

    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites?  Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.

Im Error log des Lighttpd steht leider auch nichts aktuelles drin :/
 
Last edited by a moderator:
Ich habe gerade Apache und Lighttpd gelöscht und wollte lighttpd nochmal neuinstallieren. Habe auch das Verzeichnis /etc/lighttpd gelöscht. Wenn ich jetzt aptitude install lighttpd lighttpd-doc das ganze neuinstallieren will. Wird dort nichts neues mehr angelegt. Das Ganze hatte ich gestern auch schon mal mit dem Apache hab, dann aber im Netz den Befehl gefunden, wie man das wieder richtig installiert. Finde aber nichts für lighttpd.

Edit: Hab die Einstellungen vom anderen vserver wieder übernommen und dpkg-reconfigure lighttpd gemacht.

Zurück zum eig Problem, komme leider nicht weiter :/
 
Last edited by a moderator:
Hallo,

/usr/sbin/lighttpd -V

PHP:
lighttpd-1.4.19 (ssl) - a light and fast webserver
Build-Date: Jul 29 2008 18:58:09

Event Handlers:

        + select (generic)
        + poll (Unix)
        + rt-signals (Linux 2.4+)
        + epoll (Linux 2.6)
        - /dev/poll (Solaris)
        - kqueue (FreeBSD)

Network handler:

        + sendfile

Features:

        + IPv6 support
        + zlib support
        + bzip2 support
        + crypt support
        + SSL Support
        + PCRE support
        + mySQL support
        + LDAP support
        + memcached support
        + FAM support
        + LUA support
        + xml support
        + SQLite support
        + GDBM support

PHP:
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -t
Syntax OK

PHP:
 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D

Das 3. bringt keine Ausgabe.

Sorry mit Multipostings wusste ich nicht. Hoffe das kann weiterhelfen :/
 
Habs nochmal deinstalliert und neuinstalliert.

Sieht für mich ok aus:

PHP:
aptitude install lighttpd lighttpd-doc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following NEW packages will be installed:
  lighttpd lighttpd-doc
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/349kB of archives. After unpacking 1208kB will be used.
Writing extended state information... Done
Selecting previously deselected package lighttpd.
(Reading database ... 24901 files and directories currently installed.)
Unpacking lighttpd (from .../lighttpd_1.4.19-4ubuntu2_i386.deb) ...
Selecting previously deselected package lighttpd-doc.
Unpacking lighttpd-doc (from .../lighttpd-doc_1.4.19-4ubuntu2_all.deb) ...
Setting up lighttpd (1.4.19-4ubuntu2) ...
 * Starting web server lighttpd                                                                                                                       [ OK ]

Setting up lighttpd-doc (1.4.19-4ubuntu2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
 
läuft er denn jetzt?
Code:
ps -Af  | grep lighttpd
Das hat vorher übrigens gezeigt, dass dein lighttpd nicht gestartet hat und deshalb hätte ich auch gerne einen Auszug aus den Logfiles gehabt, aber dazu isses nu zu spät. :D
 
Code:
ps -Af  | grep lighttpd
root     22521 22466  0 18:24 pts/0    00:00:00 grep lighttpd

im /var/log/lighttpd/error.log
Steht aktuell nichts drin. Bzw ist nicht angelegt.
 
Last edited by a moderator:
Ist denn der /etc/lighttpd Ordner wieder vorhanden?

Er scheint ja momentan nicht gestartet zu sein.

Wenn der Ordner nicht vorhanden is, benutz mal das Tool "locate" (Paket sollte mlocate oder slocate heißen) um zu schauen, ob irgendwo ne lighttpd.conf zu finden is. Wenn nicht, kannst du den Ordner auch erstellen und selber wieder eine conf darin erstellen. ;)
 
Lighttpd Ordner ist wieder vorhanden. Habe diese vom anderen vServer rübergeschoben. Die config ist die wie oben gepostet.
 
So hat sich erledigt, danke die die geantwortet haben. Habe den vServer neuinstallieren lassen. Läuft nun.
 
Back
Top