diff options
Diffstat (limited to 'abs/core/lighttpd/lighttpd.conf')
-rw-r--r-- | abs/core/lighttpd/lighttpd.conf | 256 |
1 files changed, 85 insertions, 171 deletions
diff --git a/abs/core/lighttpd/lighttpd.conf b/abs/core/lighttpd/lighttpd.conf index 9851727..3fff75c 100644 --- a/abs/core/lighttpd/lighttpd.conf +++ b/abs/core/lighttpd/lighttpd.conf @@ -12,28 +12,28 @@ # - saves some time # - saves memory server.modules = ( - "mod_rewrite", + "mod_rewrite", # "mod_redirect", - "mod_alias", - "mod_access", + "mod_alias", + "mod_access", # "mod_cml", # "mod_trigger_b4_dl", - "mod_auth", - "mod_status", - "mod_setenv", - "mod_fastcgi", - "mod_proxy", + "mod_auth", + "mod_status", + "mod_setenv", + "mod_fastcgi", + "mod_proxy", # "mod_simple_vhost", # "mod_evhost", # "mod_userdir", - "mod_cgi", + "mod_cgi", # "mod_compress", # "mod_ssi", # "mod_usertrack", # "mod_expire", # "mod_secdownload", # "mod_rrdtool", - "mod_accesslog" ) + "mod_accesslog" ) ## a static document-root, for virtual-hosting take look at the ## server.virtual-* options @@ -58,62 +58,63 @@ index-file.names = ( "index.php", "index.html", # 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", - ".jar" => "application/x-java-archive", - ".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", - ".mp4" => "video/quicktime", - ".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", - # default mime type - "" => "application/octet-stream", - ) +".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", +".jar" => "application/x-java-archive", +".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", +".shtml" => "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", +".mp4" => "video/quicktime", +".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", +# default mime type +"" => "application/octet-stream", +) # Use the "Content-Type" extended attribute to obtain mime type if possible #mimetype.use-xattr = "enable" @@ -132,8 +133,9 @@ mimetype.assign = ( url.access-deny = ( "~", ".inc" ) $HTTP["url"] =~ "\.pdf$" { - server.range-requests = "disable" + server.range-requests = "disable" } +ssi.extension = ( ".shtml" ) ## # which extensions should not be handle via static-file transfer @@ -151,7 +153,6 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) ## error-handler for status 404 server.error-handler-404 = "/404.html" -#server.error-handler-404 = "/error-handler.php" ## to help the rc.scripts server.pid-file = "/var/run/lighttpd/lighttpd.pid" @@ -218,7 +219,7 @@ server.groupname = "http" #### fastcgi module ## read fastcgi.txt for more info ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini - fastcgi.server = ( +fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/lighttpd/mythtv-php-fcgi.socket", @@ -232,118 +233,31 @@ server.groupname = "http" )) ) - setenv.add-environment = ( - "db_server" => "localhost", - "db_name" => "mythconverg", - "db_login" => "mythtv", - "db_password" => "mythtv" -) + setenv.add-environment = ( + "db_server" => "localhost", + "db_name" => "mythconverg", + "db_login" => "mythtv", + "db_password" => "mythtv" +) #### CGI module -cgi.assign = ( ".pl" => "/usr/bin/perl", - ".cgi" => "/usr/bin/perl", - ".sh" => "/bin/bash", - ".py" => "/usr/bin/python") - - url.rewrite-once = ( - "^/mythweb/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" => "$0", - "^/mythweb/(pl(/.*)?)$" => "/mythweb/mythweb.pl/$1", - "^/mythweb/(.+)$" => "/mythweb/mythweb.php/$1", - "^/mythweb/(.*)$" => "/mythweb/mythweb.php" - ) - - - -#### SSL engine -#ssl.engine = "enable" -#ssl.pemfile = "/etc/ssl/private/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 = ( "/mythweb => -# ( -# "method" => "plain", -# "realm" => "download archiv", -# "require" => "valid-user" -# ) -# "/server-config" => -# ( -# "method" => "digest", -# "realm" => "download archiv", -# "require" => "valid-user" -# ) -# ) +cgi.assign = ( ".pl" => "/usr/bin/perl", + ".cgi" => "/usr/bin/perl", + ".sh" => "/bin/bash", + ".py" => "/usr/bin/python2") +alias.url = ( "/unicorn" => "/data/srv/httpd/supercorn" ) +alias.url += ( "/cgi-bin" => "/data/srv/httpd/cgi-bin/") +$HTTP["url"] =~ "^/cgi-bin" { + cgi.assign = ( "" => "" ) + } #### 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 = "/srv/http/vhosts/%3/htdocs/" - -#### expire module -#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") - -#### ssi -#ssi.extension = ( ".shtml" ) - -#### rrdtool -#rrdtool.binary = "/usr/bin/rrdtool" -#rrdtool.db-name = "/var/lib/lighttpd/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 = "/var/lib/lighttpd/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" -## array merge -#index-file.names = (foo + ".php") + index-file.names -#index-file.names += (foo + ".php") - #### include #include "/etc/lighttpd/auth-inc.conf" ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" |