Problem z konfiguracją Lighttpd na LEDE. Powiedzmy że jest to trochę powiązane z tematem więc tu podpiąłem pytanie.
Na Openwrt CC miałem już sprawdzony działający konfig. Na Lede mam problemy. Wywala błąd:
2017-12-11 23:03:31: (plugin.c.187) Cannot load plugin mod_fastcgi more than once, please fix your config (lighttpd may not accept such configs in future releases)
2017-12-11 23:03:31: (plugin.c.227) dlopen() failed for: /usr/lib/lighttpd/mod_authn_file.so Error loading shared library /usr/lib/lighttpd/mod_authn_file.so: No such file or directory
2017-12-11 23:03:31: (server.c.911) loading plugins finally failed
Mój konfig (trochę w nim bałagan)
# lighttpd configuration file
#
## modules to load
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_cgi",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_webdav"
)
# force use of the "write" backend (closes: #2401)
server.network-backend = "write"
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/mnt/sda1/www"
#dir-listing.encoding = "utf-8"
## where to send error-messages to
server.errorlog = "/tmp/log/lighttpd/error.log"
## files to check for if .../ is requested
index-file.names = ( "index.html", "default.html", "index.htm", "default.htm", "index.php", "index.lighttpd.html" )
## Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetypes.use-xattr = "enable"
## send a different Server: header
## be nice and keep it at lighttpd
#server.tag = "lighttpd"
$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 = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
server.port = 80
## bind to localhost (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"
###### 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>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/www/error-"
## virtual directory listings
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 = "nobody"
#
server.upload-dirs = ( "/tmp" )
## change uid to <uid> (default: don't care)
#server.groupname = "nobody"
#### compress module
#compress.cache-dir = "/dev/null/"
#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
#fastcgi.debug = 1
fastcgi.server = (
".php" => ((
"host" => "127.0.0.1",
"port" => 1026,
#"bin-path" => "/usr/bin/php-cgi",
#"bin-path" => "/usr/bin/php-fcgi", # wydaje sie ok
"check-local" => "enable",
#"max-procs" => 2, # 4 default value, 1 lub 2 wydaje sie ok
#"bin-environment" => (
#"PHP_FCGI_CHILDREN" => "20", # 1 default value, 50 wydaje sie ok
#"PHP_FCGI_MAX_REQUESTS" => "100" # 500 wydaje sie ok
#),
))
)
#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
#cgi.assign = (".php" => "/usr/bin/php-cgi")
#cgi.fix_pathinfo=1
#### SSL engine
#$SERVER["socket"] == "0.0.0.0:443" {
# ssl.engine = "enable"
# ssl.pemfile = "/etc/lighttpd/server.pem"
#}
#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"
#### auth module
## read authentification.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"
#auth.require = (
# "/server-status" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.1"
# ),
# "/server-info" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.1"
# )
#)
auth.debug = 2
auth.backend = "plain"
auth.backend.plain.userfile = "/etc/lighttpd/users1"
auth.require = ( "/osobiste/" =>
(
"method" => "basic",
"realm" => "Oj, nie ma tu dostepu. Podaj haslo!",
"require" => "valid-user"
),
"/yaaw/" =>
(
"method" => "basic",
"realm" => "Oj, nie ma tu dostepu. Podaj haslo!",
"require" => "valid-user"
)
)
#### 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" )
#}
#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### ssi
#ssi.extension = ( ".shtml" )
#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )
#### 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")
#### include
include "/etc/lighttpd/mime.conf"
#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 "cat /etc/lighttpd/conf.d/*.conf"
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1
#### webdav
#$HTTP["url"] =~ "^/webdav($|/)" {
# webdav.activate = "enable"
# webdav.is-readonly = "enable"
# webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
#}
TP-Link TL-WDR4300 Mod, CPU 700MHz, Flash 16 MB, Gargoyle 1.5.11.4, extroot + dysk zewnętrzny Samsung (S2), kamerka MS LifeCam HD-5000
TP-Link TL-WR1043ND Mod, RAM 64 MB, chłodzenie pasywne, Gargoyle 1.5.10.14, extroot, kamerka Logitech HD Webcam C270