Disable Error Log Lighttpd
Contents |
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of lighttpd disable rc4 this site About Us Learn more about Stack Overflow the company Business Learn lighttpd disable http more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _
Lighttpd Error Log Location
Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody
Lighttpd Php Error Log
can answer The best answers are voted up and rise to the top How to enable error log in lighttpd properly? up vote 12 down vote favorite 2 I have a Centos 5 system with Lighttpd and fastcgi enabled. It does log access but does not log errors. I have Internal Server Error 500 and no info in log and when I try to lighttpd mod_fastcgi open not -existing file also - no info in error log. How to enable it properly? Below is list of modules that I've enabled: 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_webdav", # "mod_proxy_core", # "mod_proxy_backend_fastcgi", # "mod_proxy_backend_scgi", # "mod_proxy_backend_ajp13", # "mod_simple_vhost", # "mod_evhost", # "mod_userdir", # "mod_cgi", # "mod_compress", # "mod_ssi", # "mod_usertrack", # "mod_expire", # "mod_secdownload", # "mod_rrdtool", "mod_accesslog" ) Here are setting of debugging: ## enable debugging #debug.log-request-header = "enable" #debug.log-response-header = "enable" #debug.log-request-handling = "enable" debug.log-file-not-found = "enable" #debug.log-condition-handling = "enable" Setting of path to error and access log: ## where to send error-messages to server.errorlog = "/home/lxadmin/httpd/lighttpd/error.log" #### accesslog module accesslog.filename = "/home/lxadmin/httpd/lighttpd/ligh.log" Settings of fastcgi: fastcgi.debug = 1 fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket", "max-procs" => 12, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "2", "PHP_FCGI_MAX_REQUESTS" => "500" ) ))) And in included config file I have: server.errorlog = "/home/httpd/mywebsite.com/stats/mywebsite.com-error_log" What comes to log files: /home/httpd/mywebsite.com/stats/ -rw-r--r-- 1 apache apache 5173239 May 16 11:34 mywebsite.com-custom_log -rwxrwxrwx 1 root root 0 Mar 27 2009 mywebsite.com-error_log /home/lxadmin/httpd/lighttpd/ -rwxrwxrwx 1 apache apach
mod_accesslog AccesslogDescriptionOptionsResponse Header Description¶ CLF like by default, flexible like apache Options¶ accesslog.use-syslog send the accesslog to syslog Default: disabled accesslog.syslog-level (since 1.4.33) severity level for syslog logging Default: 6 (info) See http://en.wikipedia.org/wiki/Syslog#Severity_levels for numerical values accesslog.filename name of the file where the accesslog should be written
Lighttpd Syslog
to if syslog is not used. if the name starts with a '|' the lighttpd config file location rest of the name is taken as the name of a process which will be spawned and will get the output e.g.: lighttpd mod_access accesslog.filename = "/var/log/lighttpd.log" $HTTP["host"] == "mail.example.org" { accesslog.filename = "|/usr/bin/cronolog" } if you have multiple workers on 1.4.x (now, the current version) and want all access logs to be written (without that, only one worker http://serverfault.com/questions/142320/how-to-enable-error-log-in-lighttpd-properly will write logs), use accesslog.filename = "\|/usr/sbin/cronolog.." Default: disabled accesslog.format the format of the logfile Option Description %% a percent sign %h name or address of remote-host %l ident name (not supported) %u authenticated user %t timestamp of the end-time of the request %{...}t timestamp of the end-time of the request (supported in 1.4.40) %r request-line %s status code %b bytes sent for the body %i HTTP-header field %a remote address http://redmine.lighttpd.net/projects/1/wiki/Docs_ModAccesslog (supported in 1.4.40) %A local address (supported in 1.4.40) %B same as %b %C cookie field (supported in 1.4.40) %D time used in ms (supported in 1.4.40) %e environment %f physical filename %H request protocol (HTTP/1.0, ...) %k num keepalives (supported in 1.4.40) %m request method (GET, POST, ...) %n (not supported) %o response header %p server port %P (not supported) %q query string %T time used in seconds %{UNIT}T time used in UNIT (s, ms, us, or ns) (supported in 1.4.40) %U request URL %v server-name %V HTTP request host name %X connection status %I bytes incoming %O bytes outgoing If %s is written %>s or % are ignored. They are supported for compatibility with apache. %h will always return the IP address of the host, never the name. This makes it equivalent to %a. %a, %A, %{name}C, %D, %k, %{...}t, %{...}T are implemented in lighttpd 1.4.40 and later. %i and %o expect the name of the field which should be written in curly brackets. %q is not prepended with '?', unlike Apache %{StrFTime format string}t is supported since 1.4.24. %t does not work the same way it works in Apache (where the start of the request is recorded). Instead it shows the time the requ
file 2 # 3 # use it as a base for lighttpd 1.0.0 and above 4 # 5 # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ 6 https://redmine.lighttpd.net/attachments/659/lighttpd.conf 7 ############ Options you really have to take care of #################### 8 9 ## modules to load 10 # at least mod_access and mod_accesslog should be http://blog.hintcafe.com/post/34963214842/lighttpd-syslog-for-logs-enabling-status loaded 11 # all other module should only be loaded if really neccesary 12 # - saves some time 13 # - saves memory 14 error log server.modules = ( 15 # "mod_rewrite", 16 # "mod_redirect", 17 # "mod_alias", 18 "mod_access", 19 # "mod_cml", 20 # "mod_trigger_b4_dl", 21 # "mod_auth", 22 # "mod_status", 23 # "mod_setenv", 24 # "mod_fastcgi", 25 # "mod_proxy", 26 # "mod_simple_vhost", 27 # "mod_evhost", 28 # "mod_userdir", 29 # "mod_cgi", 30 # "mod_compress", disable error log 31 # "mod_ssi", 32 # "mod_usertrack", 33 # "mod_expire", 34 # "mod_secdownload", 35 # "mod_rrdtool", 36 "mod_accesslog" ) 37 38 ## a static document-root, for virtual-hosting take look at the 39 ## server.virtual-* options 40 server.document-root = "C:/lighttpd/htdocs/" 41 42 ## where to send error-messages to 43 server.errorlog = "C:/lighttpd/logs/lighttpd.error.log" 44 45 # files to check for if .../ is requested 46 index-file.names = ( "index.php", "index.html", 47 "index.htm", "default.htm" ) 48 49 ## set the event-handler (read the performance section in the manual) 50 # server.event-handler = "freebsd-kqueue" # needed on OS X 51 52 # mimetype mapping 53 mimetype.assign = ( 54 ".pdf" => "application/pdf", 55 ".sig" => "application/pgp-signature", 56 ".spl" => "application/futuresplash", 57 ".class" => "application/octet-stream", 58 ".ps" => "application/postscript", 59 ".torrent" => "application/x-bittorrent", 60 ".dvi" => "application/x-dvi", 61 ".gz" => "application/x-gzip", 62 ".pac" => "application/x-ns-proxy-autoconfig", 63 ".swf" => "application/x-shockwave-flash", 64 ".tar.gz" => "application/x-tgz", 65 ".tgz" =
log files. If you want lighttpd to write to syslog instead, try something like server.errorlog-use-syslog = "enable" accesslog.use-syslog = "enable" Create file /etc/rsyslog.d/10-lighttpd.conf with following text $template Lighttpd,"%msg%\n" if $programname == 'lighttpd' and $syslogseverity-text != 'err' then -/var/log/lighttpd/access.log;Lighttpd if $programname == 'lighttpd' and $syslogseverity-text == 'err' then -/var/log/lighttpd/error.log;Lighttpd & ~ You can also enable lighttpd status and statistics using the following lines in config status.status-url = "/stats/status" status.statistics-url = "/stats/statistics" You can optionally disable keep-alive by server.max-keep-alive-requests = 0 or hide the web server information server.tag = "Webserver" We love Tumblr & Stationery by Thijs