[SOLVED] Can't enable server.modules and php
Added by TeHashX over 12 years ago
Hi I installed lighttpd on my asus RT-N66U router through entware and is working great but I can't enable php, if I unmark server.modules I can't start the server and I get nothing in error.log
If I mark server.modules, is starting with this error in log:
2012-12-28 22:33:38: (log.c.166) server started 2012-12-28 22:33:38: (server.c.968) WARNING: unknown config-key: fastcgi.server (ignored)
This is my lighttpd.conf
# 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 = "/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.html", "default.html", "index.htm", "default.htm" ) ## mimetype mapping mimetype.assign = ( ".pdf" => "application/pdf", ".class" => "application/octet-stream", ".pac" => "application/x-ns-proxy-autoconfig", ".swf" => "application/x-shockwave-flash", ".wav" => "audio/x-wav", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".svg" => "image/svg+xml", ".css" => "text/css", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", ".txt" => "text/plain", ".dtd" => "text/xml", ".xml" => "text/xml" ) ## 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 = 8008 ## 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 = ( "/opt/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 ## read fastcgi.txt for more info fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/opt/tmp/php-fastcgi.socket", "bin-path" => "/opt/bin/php-cgi" ) ) ) #### CGI module #cgi.assign = ( ".pl" => "/opt/bin/perl", ".cgi" => "/opt/bin/perl" ) #### SSL engine #ssl.engine = "enable" #ssl.pemfile = "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.10" # ), # "/server-info" => ( # "method" => "digest", # "realm" => "download archiv", # "require" => "group=www|user=jan|host=192.168.2.10" # ) #) #### 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 /opt/etc/lighttpd/lighttpd-inc.conf ## same as above if you run: "lighttpd -f /opt/etc/lighttpd/lighttpd.conf" #include "lighttpd-inc.conf" #### include_shell #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 = "/opt/var/run/lighttpd-webdav-lock.db" #}
Installed packages
alsa-lib - 1.0.24.1-1 cgilib - 0.7-1 curl - 7.23.1-1 findutils - 4.5.10-1 ldconfig - 0.9.32-4 libapr - 1.4.5-2 libaprutil - 1.3.12-2 libbz2 - 1.0.6-1 libc - 0.9.32-4 libcurl - 7.23.1-1 libevent2 - 2.0.19-1 libexif - 0.6.19-1 libexpat - 2.0.1-1 libffmpeg-full - 0.8.7-2 libflac - 1.2.1-1 libgcc - 4.6.3-4 libiconv-full - 1.11.1-1 libid3tag - 0.15.1b-3 libintl-full - 0.18.1.1-2 libjpeg - 6b-1 libltdl - 2.4-1 liblua - 5.1.5-1 libminiupnpc - 1.6-1 libncurses - 5.7-6a libogg - 1.1.4-2 libopenssl - 1.0.1c-1 libpcre - 8.11-2 libpthread - 0.9.32-4 librt - 0.9.32-4 libsqlite3 - 3071201-1 libstdcpp - 4.6.3-4 libuuid - 2.21.2-1 libvorbis - 1.2.3-1 libxml2 - 2.7.8-2 lighttpd - 1.4.30-3 mjpg-streamer - r148-4 nano - 2.2.6-1a perl - 5.10.0-7 php5 - 5.4.5-3 php5-cgi - 5.4.5-3 php5-fastcgi - 5.4.5-3 terminfo - 5.7-6a transmission-daemon - 2.72-1 transmission-web - 2.72-1 uclibc-opt - 0.9.32-3 unixodbc - 2.3.1-1 zlib - 1.2.7-1
THX
Replies (6)
RE: Can't enable server.modules and php - Added by nitrox over 12 years ago
Perhaps the mod_fastcgi module isn´t available on your installation or the path to the modules is different from default? Start without init-script and perhaps the -D option, also make sure the module is avail.
RE: Can't enable server.modules and php - Added by TeHashX over 12 years ago
nitrox wrote:
Perhaps the mod_fastcgi module isn´t available on your installation or the path to the modules is different from default? Start without init-script and perhaps the -D option, also make sure the module is avail.
I get
(plugin.c.169) dlopen() failed for: /opt/lib/lighttpd/mod_fastcgi.so File not found
RE: Can't enable server.modules and php - Added by nitrox over 12 years ago
Try to find it and -m might help.
RE: Can't enable server.modules and php - Added by TeHashX over 12 years ago
nitrox wrote:
Try to find it and -m might help.
I can't find php modules, should be added automaticaly when I installed php from entware?
RE: Can't enable server.modules and php - Added by Anonymous over 12 years ago
Lighttpd work perfect on Entware. All you need is to install necessary modules and edit a few string in lighttpd.conf.
Here is an example.
RE: Can't enable server.modules and php - Added by TeHashX over 12 years ago
It's worked after installing lighttpd-mod-fastcgi.
THX ryzhov_al