diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-02-02 01:39:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-02-02 01:39:05 +0000 |
commit | fcc5224904648a8e6eb528d7603154160a20022f (patch) | |
tree | 3bfce096b38a9cea8eed13fc70c1526c456e9abd /www-servers/lighttpd/files | |
parent | 2fd57282f0262ca084e05b0f2c63fbada395d02b (diff) |
gentoo resync : 02.02.2022
Diffstat (limited to 'www-servers/lighttpd/files')
-rw-r--r-- | www-servers/lighttpd/files/conf/lighttpd.conf | 366 | ||||
-rw-r--r-- | www-servers/lighttpd/files/conf/lighttpd.conf-r1 | 309 | ||||
-rw-r--r-- | www-servers/lighttpd/files/conf/mime-types.conf | 328 | ||||
-rw-r--r-- | www-servers/lighttpd/files/conf/mod_cgi.conf | 28 | ||||
-rw-r--r-- | www-servers/lighttpd/files/conf/mod_fastcgi.conf | 17 | ||||
-rw-r--r-- | www-servers/lighttpd/files/lighttpd.initd-r1 | 79 |
6 files changed, 727 insertions, 400 deletions
diff --git a/www-servers/lighttpd/files/conf/lighttpd.conf b/www-servers/lighttpd/files/conf/lighttpd.conf index 2a13a57c1c8d..13d5e772ac1b 100644 --- a/www-servers/lighttpd/files/conf/lighttpd.conf +++ b/www-servers/lighttpd/files/conf/lighttpd.conf @@ -2,67 +2,67 @@ # Default lighttpd.conf for Gentoo. ############################################################################### -# {{{ variables -var.basedir = "/var/www/localhost" -var.logdir = "/var/log/lighttpd" +# Variables +var.basedir = "/var/www/localhost" +var.logdir = "/var/log/lighttpd" var.statedir = "/var/lib/lighttpd" -# }}} -# {{{ modules + +# Modules # At the very least, mod_access and mod_accesslog should be enabled. # All other modules should only be loaded if necessary. # NOTE: the order of modules is important. server.modules = ( -# "mod_rewrite", -# "mod_redirect", -# "mod_alias", - "mod_access", -# "mod_cml", -# "mod_trigger_b4_dl", -# "mod_auth", -# "mod_status", -# "mod_setenv", -# "mod_proxy", -# "mod_simple_vhost", -# "mod_evhost", -# "mod_userdir", -# "mod_compress", -# "mod_ssi", -# "mod_usertrack", -# "mod_expire", -# "mod_secdownload", -# "mod_rrdtool", -# "mod_webdav", - "mod_accesslog" +# "mod_rewrite", +# "mod_redirect", +# "mod_alias", + "mod_access", +# "mod_cml", +# "mod_trigger_b4_dl", +# "mod_auth", +# "mod_status", +# "mod_setenv", +# "mod_proxy", +# "mod_simple_vhost", +# "mod_evhost", +# "mod_userdir", +# "mod_compress", +# "mod_ssi", +# "mod_usertrack", +# "mod_expire", +# "mod_secdownload", +# "mod_rrdtool", +# "mod_webdav", + "mod_accesslog" ) -# }}} -# {{{ includes + +# Includes include "mime-types.conf" -# fcgi and cgi are included below -# }}} +# include "mod_cgi.conf" +# include "mod_fastcgi.conf" -# {{{ server settings -server.username = "lighttpd" -server.groupname = "lighttpd" +# Server Settings +server.username = "lighttpd" +server.groupname = "lighttpd" server.document-root = var.basedir + "/htdocs" -server.pid-file = "/run/lighttpd.pid" - -server.errorlog = var.logdir + "/error.log" +server.pid-file = "/run/lighttpd.pid" +server.errorlog = var.logdir + "/error.log" # log errors to syslog instead -# server.errorlog-use-syslog = "enable" - -server.indexfiles = ("index.php", "index.html", - "index.htm", "default.htm") - -# server.tag = "lighttpd" - +# server.errorlog-use-syslog = "enable" +server.indexfiles = ( + "index.php", + "index.html", + "index.htm", + "default.htm" +) +# server.tag = "lighttpd" server.follow-symlink = "enable" # event handler (defaults to "poll") # see performance.txt -# + # for >= linux-2.4 # server.event-handler = "linux-rtsig" # for >= linux-2.6 @@ -71,13 +71,13 @@ server.follow-symlink = "enable" # server.event-handler = "freebsd-kqueue" # chroot to directory (defaults to no chroot) -# server.chroot = "/" +# server.chroot = "/" # bind to port (defaults to 80) -# server.port = 81 +# server.port = 81 # bind to name (defaults to all interfaces) -# server.bind = "grisu.home.kneschke.de" +# server.bind = "grisu.home.kneschke.de" # error-handler for status 404 # server.error-handler-404 = "/error-handler.html" @@ -85,157 +85,130 @@ server.follow-symlink = "enable" # Format: <errorfile-prefix><status-code>.html # -> ..../status-404.html for 'File not found' -# server.errorfile-prefix = var.basedir + "/error/status-" +# server.errorfile-prefix = var.basedir + "/error/status-" # FAM support for caching stat() calls # requires that lighttpd be built with USE=fam -# server.stat-cache-engine = "fam" +# server.stat-cache-engine = "fam" # If lighttpd was build with IPv6 support, and you would like to listen on IPv6, # uncomment the following: # server.use-ipv6 = "enable" -# }}} - -# {{{ mod_staticfile +# mod_staticfile # which extensions should not be handled via static-file transfer # (extensions that are usually handled by mod_cgi, mod_fastcgi, etc). static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi") -# }}} -# {{{ mod_accesslog + +# mod_accesslog accesslog.filename = var.logdir + "/access.log" -# }}} -# {{{ mod_dirlisting + +# mod_dirlisting # enable directory listings -# dir-listing.activate = "enable" -# +# dir-listing.activate = "enable" + # don't list hidden files/directories -# dir-listing.hide-dotfiles = "enable" -# +# dir-listing.hide-dotfiles = "enable" + # use a different css for directory listings -# dir-listing.external-css = "/path/to/dir-listing.css" -# -# list of regular expressions. files that match any of the +# dir-listing.external-css= "/path/to/dir-listing.css" + +# list of regular expressions. Files that match any of the # specified regular expressions will be excluded from directory # listings. -# dir-listing.exclude = ("^\.", "~$") -# }}} +# dir-listing.exclude = ("^\.", "~$") -# {{{ mod_access -# see access.txt +# mod_access url.access-deny = ("~", ".inc") -# }}} -# {{{ mod_userdir -# see userdir.txt -# + +# mod_userdir # userdir.path = "public_html" # userdir.exclude-user = ("root") -# }}} -# {{{ mod_ssi -# see ssi.txt -# + +# mod_ssi # ssi.extension = (".shtml") -# }}} - -# {{{ mod_ssl -# see ssl.txt -# -# ssl.engine = "enable" -# ssl.pemfile = "server.pem" -# }}} - -# {{{ mod_status -# see status.txt -# + + +# mod_ssl +# ssl.engine = "enable" +# ssl.pemfile = "server.pem" + + +# mod_status # status.status-url = "/server-status" # status.config-url = "/server-config" -# }}} - -# {{{ mod_simple_vhost -# see simple-vhost.txt -# -# If you want name-based virtual hosting add the next three settings and load -# mod_simple_vhost -# + + +# mod_simple_vhost +# 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.server-root = "/home/user/webroot/servers/" +# simple-vhost.default-host = "www.example.org" # simple-vhost.document-root = "/pages/" -# }}} - -# {{{ mod_compress -# see compress.txt -# -# compress.cache-dir = var.statedir + "/cache/compress" -# compress.filetype = ("text/plain", "text/html") -# }}} - -# {{{ mod_proxy -# see proxy.txt -# -# proxy.server = ( ".php" => -# ( "localhost" => -# ( -# "host" => "192.168.0.101", -# "port" => 80 -# ) -# ) -# ) -# }}} - -# {{{ mod_auth -# see authentication.txt -# -# auth.backend = "plain" + + +# mod_compress +# compress.cache-dir = var.statedir + "/cache/compress" +# compress.filetype = ("text/plain", "text/html") + + +# mod_proxy +# proxy.server = ( +# ".php" => ( +# "localhost" => ( +# "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +# ) + + +# mod_auth +# 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 = ( "/server-status" => -# ( -# "method" => "digest", -# "realm" => "download archiv", -# "require" => "user=jan" -# ), -# "/server-info" => -# ( -# "method" => "digest", -# "realm" => "download archiv", -# "require" => "valid-user" -# ) -# ) -# }}} - -# {{{ mod_rewrite -# see rewrite.txt -# +# auth.backend.ldap.base-dn = "dc=my-domain,dc=com" +# auth.backend.ldap.filter = "(uid=$)" + +#auth.require = ( +# "/server-status" => ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "user=jan" +# ), +# "/server-info" => ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "valid-user" +# ) +#) + + +# mod_rewrite # url.rewrite = ( -# "^/$" => "/server-status" +# "^/$" => "/server-status" # ) -# }}} -# {{{ mod_redirect -# see redirect.txt -# + +# mod_redirect # url.redirect = ( -# "^/wishlist/(.+)" => "http://www.123.org/$1" +# "^/wishlist/(.+)" => "http://www.123.org/$1" # ) -# }}} -# {{{ mod_evhost + +# mod_evhost # define a pattern for the host url finding # %% => % sign # %0 => domain name + tld @@ -243,87 +216,64 @@ url.access-deny = ("~", ".inc") # %2 => domain name without tld # %3 => subdomain 1 name # %4 => subdomain 2 name -# -# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" -# }}} +# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" -# {{{ mod_expire + +# mod_expire # expire.url = ( -# "/buggy/" => "access 2 hours", -# "/asdhas/" => "access plus 1 seconds 2 minutes" +# "/buggy/" => "access 2 hours", +# "/asdhas/" => "access plus 1 seconds 2 minutes" # ) -# }}} -# {{{ mod_rrdtool -# see rrdtool.txt -# -# rrdtool.binary = "/usr/bin/rrdtool" + +# mod_rrdtool +# rrdtool.binary = "/usr/bin/rrdtool" # rrdtool.db-name = var.statedir + "/lighttpd.rrd" -# }}} -# {{{ mod_setenv -# see setenv.txt -# -# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) + +# mod_setenv +# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) # setenv.add-response-header = ( "X-Secret-Message" => "42" ) -# }}} -# {{{ mod_trigger_b4_dl -# see trigger_b4_dl.txt -# + +# mod_trigger_b4_dl # trigger-before-download.gdbm-filename = "/home/weigon/testbase/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 -# }}} -# {{{ mod_cml -# see cml.txt -# + +# mod_cml # don't forget to add index.cml to server.indexfiles -# cml.extension = ".cml" -# cml.memcache-hosts = ( "127.0.0.1:11211" ) -# }}} +# cml.extension = ".cml" +# cml.memcache-hosts = ( "127.0.0.1:11211" ) -# {{{ mod_webdav -# see webdav.txt -# + +# mod_webdav # $HTTP["url"] =~ "^/dav($|/)" { -# webdav.activate = "enable" -# webdav.is-readonly = "enable" +# webdav.activate = "enable" +# webdav.is-readonly = "enable" # } -# }}} -# {{{ extra rules -# + +# Extra Rules # set Content-Encoding and reset Content-Type for browsers that # support decompressing on-thy-fly (requires mod_setenv) # $HTTP["url"] =~ "\.gz$" { -# setenv.add-response-header = ("Content-Encoding" => "x-gzip") -# mimetype.assign = (".gz" => "text/plain") +# setenv.add-response-header = ("Content-Encoding" => "x-gzip") +# mimetype.assign = (".gz" => "text/plain") # } # $HTTP["url"] =~ "\.bz2$" { -# setenv.add-response-header = ("Content-Encoding" => "x-bzip2") -# mimetype.assign = (".bz2" => "text/plain") +# setenv.add-response-header = ("Content-Encoding" => "x-bzip2") +# mimetype.assign = (".bz2" => "text/plain") # } -# -# }}} -# {{{ debug -# debug.log-request-header = "enable" -# debug.log-response-header = "enable" -# debug.log-request-handling = "enable" -# debug.log-file-not-found = "enable" -# }}} -# {{{ cgi includes -# uncomment for cgi support -# include "mod_cgi.conf" -# uncomment for php/fastcgi support -# include "mod_fastcgi.conf" -# }}} - -# vim: set ft=conf foldmethod=marker et : +# Debug +# debug.log-request-header = "enable" +# debug.log-response-header = "enable" +# debug.log-request-handling = "enable" +# debug.log-file-not-found = "enable" diff --git a/www-servers/lighttpd/files/conf/lighttpd.conf-r1 b/www-servers/lighttpd/files/conf/lighttpd.conf-r1 new file mode 100644 index 000000000000..1017098caa4f --- /dev/null +++ b/www-servers/lighttpd/files/conf/lighttpd.conf-r1 @@ -0,0 +1,309 @@ +############################################################################### +# Default lighttpd.conf for Gentoo. +############################################################################### + +# {{{ variables +var.basedir = "/var/www/localhost" +var.logdir = "/var/log/lighttpd" +var.statedir = "/var/lib/lighttpd" +# }}} + +# {{{ modules +# At the very least, mod_access and mod_accesslog should be enabled. +# All other modules should only be loaded if necessary. +# NOTE: the order of modules is important. +server.modules = ( +# "mod_rewrite", +# "mod_redirect", +# "mod_alias", + "mod_access", +# "mod_magnet", +# "mod_auth", +# "mod_status", +# "mod_setenv", +# "mod_proxy", +# "mod_simple_vhost", +# "mod_evhost", +# "mod_userdir", +# "mod_deflate", +# "mod_ssi", +# "mod_usertrack", +# "mod_expire", +# "mod_secdownload", +# "mod_rrdtool", +# "mod_webdav", + "mod_accesslog" +) +# }}} + +# {{{ includes +include "mime-types.conf" +# fcgi and cgi are included below +# }}} + +# {{{ server settings +server.username = "lighttpd" +server.groupname = "lighttpd" + +server.document-root = var.basedir + "/htdocs" +server.pid-file = "/run/lighttpd.pid" + +server.errorlog = var.logdir + "/error.log" +# log errors to syslog instead +# server.errorlog-use-syslog = "enable" + +server.indexfiles = ("index.php", "index.html", + "index.htm", "default.htm") + +# server.tag = "lighttpd" + +server.follow-symlink = "enable" + +# event handler (defaults to "poll") +# see performance.txt +# +# for >= linux-2.4 +# server.event-handler = "linux-rtsig" +# for >= linux-2.6 +# server.event-handler = "linux-sysepoll" +# for FreeBSD +# server.event-handler = "freebsd-kqueue" + +# chroot to directory (defaults to no chroot) +# server.chroot = "/" + +# bind to port (defaults to 80) +# server.port = 81 + +# bind to name (defaults to all interfaces) +# server.bind = "grisu.home.kneschke.de" + +# error-handler for status 404 +# server.error-handler-404 = "/error-handler.html" +# server.error-handler-404 = "/error-handler.php" + +# Format: <errorfile-prefix><status-code>.html +# -> ..../status-404.html for 'File not found' +# server.errorfile-prefix = var.basedir + "/error/status-" + +# FAM support for caching stat() calls +# requires that lighttpd be built with USE=fam +# server.stat-cache-engine = "fam" + +# If lighttpd was build with IPv6 support, and you would like to listen on IPv6, +# uncomment the following: +# server.use-ipv6 = "enable" + +# }}} + +# {{{ mod_staticfile + +# which extensions should not be handled via static-file transfer +# (extensions that are usually handled by mod_cgi, mod_fastcgi, etc). +static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi") +# }}} + +# {{{ mod_accesslog +accesslog.filename = var.logdir + "/access.log" +# }}} + +# {{{ mod_dirlisting +# enable directory listings +# dir-listing.activate = "enable" +# +# don't list hidden files/directories +# dir-listing.hide-dotfiles = "enable" +# +# use a different css for directory listings +# dir-listing.external-css = "/path/to/dir-listing.css" +# +# list of regular expressions. files that match any of the +# specified regular expressions will be excluded from directory +# listings. +# dir-listing.exclude = ("^\.", "~$") +# }}} + +# {{{ mod_access +# see access.txt + +url.access-deny = ("~", ".inc") +# }}} + +# {{{ mod_userdir +# see userdir.txt +# +# userdir.path = "public_html" +# userdir.exclude-user = ("root") +# }}} + +# {{{ mod_ssi +# see ssi.txt +# +# ssi.extension = (".shtml") +# }}} + +# {{{ mod_ssl +# see ssl.txt +# +# ssl.engine = "enable" +# ssl.pemfile = "server.pem" +# }}} + +# {{{ mod_status +# see status.txt +# +# status.status-url = "/server-status" +# status.config-url = "/server-config" +# }}} + +# {{{ mod_simple_vhost +# see simple-vhost.txt +# +# 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/" +# }}} + +# {{{ mod_deflate +# see compress.txt +# +# deflate.cache-dir = var.statedir + "/cache/compress" +# deflate.mimetypes = ("text/plain", "text/html") +# }}} + +# {{{ mod_proxy +# see proxy.txt +# +# proxy.server = ( ".php" => +# ( "localhost" => +# ( +# "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +# ) +# }}} + +# {{{ mod_auth +# see authentication.txt +# +# 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 = ( "/server-status" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "user=jan" +# ), +# "/server-info" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "valid-user" +# ) +# ) +# }}} + +# {{{ mod_rewrite +# see rewrite.txt +# +# url.rewrite = ( +# "^/$" => "/server-status" +# ) +# }}} + +# {{{ mod_redirect +# see redirect.txt +# +# url.redirect = ( +# "^/wishlist/(.+)" => "http://www.123.org/$1" +# ) +# }}} + +# {{{ mod_evhost +# 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/" +# }}} + +# {{{ mod_expire +# expire.url = ( +# "/buggy/" => "access 2 hours", +# "/asdhas/" => "access plus 1 seconds 2 minutes" +# ) +# }}} + +# {{{ mod_rrdtool +# see rrdtool.txt +# +# rrdtool.binary = "/usr/bin/rrdtool" +# rrdtool.db-name = var.statedir + "/lighttpd.rrd" +# }}} + +# {{{ mod_setenv +# see setenv.txt +# +# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) +# setenv.add-response-header = ( "X-Secret-Message" => "42" ) +# }}} + +# {{{ mod_webdav +# see webdav.txt +# +# $HTTP["url"] =~ "^/dav($|/)" { +# webdav.activate = "enable" +# webdav.is-readonly = "enable" +# } +# }}} + +# {{{ extra rules +# +# set Content-Encoding and reset Content-Type for browsers that +# support decompressing on-thy-fly (requires mod_setenv) +# $HTTP["url"] =~ "\.gz$" { +# setenv.add-response-header = ("Content-Encoding" => "x-gzip") +# mimetype.assign = (".gz" => "text/plain") +# } + +# $HTTP["url"] =~ "\.bz2$" { +# setenv.add-response-header = ("Content-Encoding" => "x-bzip2") +# mimetype.assign = (".bz2" => "text/plain") +# } +# +# }}} + +# {{{ debug +# debug.log-request-header = "enable" +# debug.log-response-header = "enable" +# debug.log-request-handling = "enable" +# debug.log-file-not-found = "enable" +# }}} + +# {{{ cgi includes +# uncomment for cgi support +# include "mod_cgi.conf" +# uncomment for php/fastcgi support +# include "mod_fastcgi.conf" +# }}} + +# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/lighttpd/files/conf/mime-types.conf b/www-servers/lighttpd/files/conf/mime-types.conf index 3d7880811717..40e26c1ae9cd 100644 --- a/www-servers/lighttpd/files/conf/mime-types.conf +++ b/www-servers/lighttpd/files/conf/mime-types.conf @@ -3,168 +3,166 @@ # include'd from lighttpd.conf. ############################################################################### -# {{{ mime types -mimetype.assign = ( - ".pdf" => "application/pdf", - ".epub" => "application/epub+zip", - ".spl" => "application/futuresplash", - ".jar" => "application/java-archive", - ".class" => "application/java-vm", - ".jsonld" => "application/ld+json", - ".json" => "application/json", - ".mdb" => "application/msaccess", - ".doc" => "application/msword", - ".ogg" => "application/ogg", - ".pgp" => "application/pgp-encrypted", - ".sig" => "application/pgp-signature", - ".ps" => "application/postscript", - ".eps" => "application/postscript", - ".rar" => "applicaion/rar", - ".rdf" => "application/rdf+xml", - ".rss" => "application/rss+xml", - ".rtf" => "application/rtf", - ".azw" => "application/vnd.amazon.ebook", - ".cbz" => "application/vnd.comicbook+zip", - ".cbr" => "application/vnd.comicbook-rar", - ".exe" => "application/vnd.microsoft.portable-executable", - ".xls" => "application/vnd.ms-excel", - ".ppt" => "application/vnd.ms-powerpoint", - ".docm" => "application/vnd.ms-word.document.macroEnabled.12", - ".odt" => "application/vnd.oasis.opendocument.text", - ".ods" => "application/vnd.oasis.opendocument.spreadsheet", - ".odp" => "application/vnd.oasis.opendocument.presentation", - ".odg" => "application/vnd.oasis.opendocument.graphics", - ".odc" => "application/vnd.oasis.opendocument.chart", - ".odf" => "application/vnd.oasis.opendocument.formula", - ".odi" => "application/vnd.oasis.opendocument.image", - ".pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", - ".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", - ".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - ".vsd" => "application/vnd.visio", - ".wasm" => "application/wasm", - ".xhtml" => "application/xhtml+xml", - ".zip" => "application/zip", - ".zstd" => "application/zstd", - ".7z" => "application/x-7z-compressed", - ".dmg" => "application/x-apple-diskimage", - ".torrent" => "application/x-bittorrent", - ".bz2" => "application/x-bzip", - ".tbz" => "application/x-bzip-compressed-tar", - ".tar.bz2" => "application/x-bzip-compressed-tar", - ".pgn" => "application/x-chess-pgn", - ".deb" => "application/x-debian-package", - ".dvi" => "application/x-dvi", - ".mm" => "application/x-freemind", - ".gz" => "application/x-gzip", - ".iso" => "application/x-iso9660-image", - ".jnlp" => "application/x-java-jnlp-file", - ".pac" => "application/x-ns-proxy-autoconfig", - ".rpm" => "application/x-redhat-package-manager", - ".swf" => "application/x-shockwave-flash", - ".tar.gz" => "application/x-tgz", - ".tgz" => "application/x-tgz", - ".tar" => "application/x-tar", - ".xz" => "application/x-xz", - ".aac" => "audio/aac", - ".adts" => "audio/aac", - ".ac3" => "audio/ac3", - ".snd" => "audio/basic", - ".mid" => "audio/midi", - ".midi" => "audio/midi", - ".m4a" => "audio/mp4", - ".mp1" => "audio/mpeg", - ".mp2" => "audio/mpeg", - ".mp3" => "audio/mpeg", - ".oga" => "audio/ogg", - ".opus" => "audio/ogg", - ".spx" => "audio/ogg", - ".sid" => "audio/prs.sid", - ".mlp" => "audio/vnd.dolby.mlp", - ".dts" => "audio/vnd.dts", - ".dtshd" => "audio/vnd.dts.hd", - ".flac" => "audio/x-flac", - ".mka" => "audio/x-matroska", - ".m3u" => "audio/x-mpegurl", - ".mod" => "audio/x-mod", - ".wma" => "audio/x-ms-wma", - ".wax" => "audio/x-ms-wax", - ".wav" => "audio/x-wav", - ".otf" => "font/otf", - ".ttf" => "font/ttf", - ".woff" => "font/woff", - ".woff2" => "font/woff2", - ".bmp" => "image/bmp", - ".gif" => "image/gif", - ".heic" => "image/heic", - ".heics" => "image/heic-sequence", - ".heif" => "image/heif", - ".heifs" => "image/heif-sequence", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".png" => "image/png", - ".tif" => "image/tiff", - ".tiff" => "image/tiff", - ".svg" => "image/svg+xml", - ".svgz" => "image/svg+xml", - ".webp" => "image/webp", - ".psd" => "image/vnd.adobe.photoshop", - ".apng" => "image/vnd.mozilla.apng", - ".ico" => "image/x-icon", - ".xbm" => "image/x-xbitmap", - ".xpm" => "image/x-xpixmap", - ".xwd" => "image/x-xwindowdump", - ".ics" => "text/calendar", - ".css" => "text/css", - ".csv" => "text/csv", - ".html" => "text/html", - ".htm" => "text/html", - ".js" => "text/javascript", - ".asc" => "text/plain", - ".c" => "text/plain", - ".h" => "text/plain", - ".cc" => "text/plain", - ".cpp" => "text/plain", - ".hh" => "text/plain", - ".hpp" => "text/plain", - ".conf" => "text/plain", - ".log" => "text/plain", - ".text" => "text/plain", - ".txt" => "text/plain", - ".diff" => "text/plain", - ".patch" => "text/plain", - ".ebuild" => "text/plain", - ".eclass" => "text/plain", - ".vcard" => "text/vcard", - ".vcf" => "text/vcard", - ".dtd" => "text/xml", - ".xml" => "text/xml", - ".vcs" => "text/x-vcalendar", - ".x3db" => "model/x3d+binary", - ".x3dbz" => "model/x3d+binary", - ".x3dv" => "model/x3d+vrml", - ".x3dvz" => "model/x3d+vrml", - ".x3d" => "model/x3d+xml", - ".x3dz" => "model/x3d+xml", - ".ts" => "video/mp2t", - ".m4v" => "video/mp4", - ".mp4" => "video/mp4", - ".mpeg" => "video/mpeg", - ".mpg" => "video/mpeg", - ".ogv" => "video/ogg", - ".mov" => "video/quicktime", - ".qt" => "video/quicktime", - ".webm" => "video/webm", - ".m4u" => "video/vnd.mpegurl", - ".bik" => "video/vnd.radgamettools.bink", - ".bk2" => "video/vnd.radgamettools.bink", - ".smk" => "video/vnd.radgamettools.smacker", - ".flv" => "video/x-flv", - ".mkv" => "video/x-matroska", - ".mk3d" => "video/x-matroska-3d", - ".mng" => "video/x-mng", - ".avi" => "video/x-msvideo", - ".asf" => "video/x-ms-asf", - ".asx" => "video/x-ms-asf", - ".wmv" => "video/x-ms-wmv" - ) -# }}} +mimetype.assign = ( + ".pdf" => "application/pdf", + ".epub" => "application/epub+zip", + ".spl" => "application/futuresplash", + ".jar" => "application/java-archive", + ".class" => "application/java-vm", + ".jsonld" => "application/ld+json", + ".json" => "application/json", + ".mdb" => "application/msaccess", + ".doc" => "application/msword", + ".ogg" => "application/ogg", + ".pgp" => "application/pgp-encrypted", + ".sig" => "application/pgp-signature", + ".ps" => "application/postscript", + ".eps" => "application/postscript", + ".rar" => "applicaion/rar", + ".rdf" => "application/rdf+xml", + ".rss" => "application/rss+xml", + ".rtf" => "application/rtf", + ".azw" => "application/vnd.amazon.ebook", + ".cbz" => "application/vnd.comicbook+zip", + ".cbr" => "application/vnd.comicbook-rar", + ".exe" => "application/vnd.microsoft.portable-executable", + ".xls" => "application/vnd.ms-excel", + ".ppt" => "application/vnd.ms-powerpoint", + ".docm" => "application/vnd.ms-word.document.macroEnabled.12", + ".odt" => "application/vnd.oasis.opendocument.text", + ".ods" => "application/vnd.oasis.opendocument.spreadsheet", + ".odp" => "application/vnd.oasis.opendocument.presentation", + ".odg" => "application/vnd.oasis.opendocument.graphics", + ".odc" => "application/vnd.oasis.opendocument.chart", + ".odf" => "application/vnd.oasis.opendocument.formula", + ".odi" => "application/vnd.oasis.opendocument.image", + ".pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", + ".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + ".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + ".vsd" => "application/vnd.visio", + ".wasm" => "application/wasm", + ".xhtml" => "application/xhtml+xml", + ".zip" => "application/zip", + ".zstd" => "application/zstd", + ".7z" => "application/x-7z-compressed", + ".dmg" => "application/x-apple-diskimage", + ".torrent" => "application/x-bittorrent", + ".bz2" => "application/x-bzip", + ".tbz" => "application/x-bzip-compressed-tar", + ".tar.bz2" => "application/x-bzip-compressed-tar", + ".pgn" => "application/x-chess-pgn", + ".deb" => "application/x-debian-package", + ".dvi" => "application/x-dvi", + ".mm" => "application/x-freemind", + ".gz" => "application/x-gzip", + ".iso" => "application/x-iso9660-image", + ".jnlp" => "application/x-java-jnlp-file", + ".pac" => "application/x-ns-proxy-autoconfig", + ".rpm" => "application/x-redhat-package-manager", + ".swf" => "application/x-shockwave-flash", + ".tar.gz" => "application/x-tgz", + ".tgz" => "application/x-tgz", + ".tar" => "application/x-tar", + ".xz" => "application/x-xz", + ".aac" => "audio/aac", + ".adts" => "audio/aac", + ".ac3" => "audio/ac3", + ".snd" => "audio/basic", + ".mid" => "audio/midi", + ".midi" => "audio/midi", + ".m4a" => "audio/mp4", + ".mp1" => "audio/mpeg", + ".mp2" => "audio/mpeg", + ".mp3" => "audio/mpeg", + ".oga" => "audio/ogg", + ".opus" => "audio/ogg", + ".spx" => "audio/ogg", + ".sid" => "audio/prs.sid", + ".mlp" => "audio/vnd.dolby.mlp", + ".dts" => "audio/vnd.dts", + ".dtshd" => "audio/vnd.dts.hd", + ".flac" => "audio/x-flac", + ".mka" => "audio/x-matroska", + ".m3u" => "audio/x-mpegurl", + ".mod" => "audio/x-mod", + ".wma" => "audio/x-ms-wma", + ".wax" => "audio/x-ms-wax", + ".wav" => "audio/x-wav", + ".otf" => "font/otf", + ".ttf" => "font/ttf", + ".woff" => "font/woff", + ".woff2" => "font/woff2", + ".bmp" => "image/bmp", + ".gif" => "image/gif", + ".heic" => "image/heic", + ".heics" => "image/heic-sequence", + ".heif" => "image/heif", + ".heifs" => "image/heif-sequence", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".png" => "image/png", + ".tif" => "image/tiff", + ".tiff" => "image/tiff", + ".svg" => "image/svg+xml", + ".svgz" => "image/svg+xml", + ".webp" => "image/webp", + ".psd" => "image/vnd.adobe.photoshop", + ".apng" => "image/vnd.mozilla.apng", + ".ico" => "image/x-icon", + ".xbm" => "image/x-xbitmap", + ".xpm" => "image/x-xpixmap", + ".xwd" => "image/x-xwindowdump", + ".ics" => "text/calendar", + ".css" => "text/css", + ".csv" => "text/csv", + ".html" => "text/html", + ".htm" => "text/html", + ".js" => "text/javascript", + ".asc" => "text/plain", + ".c" => "text/plain", + ".h" => "text/plain", + ".cc" => "text/plain", + ".cpp" => "text/plain", + ".hh" => "text/plain", + ".hpp" => "text/plain", + ".conf" => "text/plain", + ".log" => "text/plain", + ".text" => "text/plain", + ".txt" => "text/plain", + ".diff" => "text/plain", + ".patch" => "text/plain", + ".ebuild" => "text/plain", + ".eclass" => "text/plain", + ".vcard" => "text/vcard", + ".vcf" => "text/vcard", + ".dtd" => "text/xml", + ".xml" => "text/xml", + ".vcs" => "text/x-vcalendar", + ".x3db" => "model/x3d+binary", + ".x3dbz" => "model/x3d+binary", + ".x3dv" => "model/x3d+vrml", + ".x3dvz" => "model/x3d+vrml", + ".x3d" => "model/x3d+xml", + ".x3dz" => "model/x3d+xml", + ".ts" => "video/mp2t", + ".m4v" => "video/mp4", + ".mp4" => "video/mp4", + ".mpeg" => "video/mpeg", + ".mpg" => "video/mpeg", + ".ogv" => "video/ogg", + ".mov" => "video/quicktime", + ".qt" => "video/quicktime", + ".webm" => "video/webm", + ".m4u" => "video/vnd.mpegurl", + ".bik" => "video/vnd.radgamettools.bink", + ".bk2" => "video/vnd.radgamettools.bink", + ".smk" => "video/vnd.radgamettools.smacker", + ".flv" => "video/x-flv", + ".mkv" => "video/x-matroska", + ".mk3d" => "video/x-matroska-3d", + ".mng" => "video/x-mng", + ".avi" => "video/x-msvideo", + ".asf" => "video/x-ms-asf", + ".asx" => "video/x-ms-asf", + ".wmv" => "video/x-ms-wmv" +) diff --git a/www-servers/lighttpd/files/conf/mod_cgi.conf b/www-servers/lighttpd/files/conf/mod_cgi.conf index 982333a007c6..9897af78eafc 100644 --- a/www-servers/lighttpd/files/conf/mod_cgi.conf +++ b/www-servers/lighttpd/files/conf/mod_cgi.conf @@ -3,30 +3,22 @@ # include'd by lighttpd.conf. ############################################################################### -# -# see cgi.txt for more information on using mod_cgi -# - server.modules += ("mod_cgi") -# NOTE: this requires mod_alias +# this requires mod_alias alias.url = ( - "/cgi-bin/" => var.basedir + "/cgi-bin/" + "/cgi-bin/" => var.basedir + "/cgi-bin/" ) -# # Note that you'll also want to enable the # cgi-bin alias via mod_alias (above). -# $HTTP["url"] =~ "^/cgi-bin/" { - # disable directory listings - dir-listing.activate = "disable" - # only allow cgi's in this directory - cgi.assign = ( - ".pl" => "/usr/bin/perl", - ".cgi" => "/usr/bin/perl" - ) -} - -# vim: set ft=conf foldmethod=marker et : + # disable directory listings + dir-listing.activate = "disable" + # only allow cgi's in this directory + cgi.assign = ( + ".pl" => "/usr/bin/perl", + ".cgi" => "/usr/bin/perl" + ) +}
\ No newline at end of file diff --git a/www-servers/lighttpd/files/conf/mod_fastcgi.conf b/www-servers/lighttpd/files/conf/mod_fastcgi.conf index 5d5ea51ef252..515e7c52aafd 100644 --- a/www-servers/lighttpd/files/conf/mod_fastcgi.conf +++ b/www-servers/lighttpd/files/conf/mod_fastcgi.conf @@ -4,13 +4,12 @@ ############################################################################### server.modules += ("mod_fastcgi") -fastcgi.server = ( ".php" => - ( "localhost" => - ( - "socket" => "/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket", - "bin-path" => "/usr/bin/php-cgi" - ) - ) - ) -# vim: set ft=conf foldmethod=marker et : +fastcgi.server = ( + ".php" => ( + "localhost" => ( + "socket" => "/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket", + "bin-path" => "/usr/bin/php-cgi" + ) + ) +) diff --git a/www-servers/lighttpd/files/lighttpd.initd-r1 b/www-servers/lighttpd/files/lighttpd.initd-r1 new file mode 100644 index 000000000000..f355a5c7232d --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.initd-r1 @@ -0,0 +1,79 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload graceful" + +LIGHTTPD_PID="$($(which lighttpd) -pf ${LIGHTTPD_CONF} | grep server.pid-file | cut -d '=' -f 2 | tr -d \\\" | tr -d [:space:])" + +depend() { + need net + use mysql logger spawn-fcgi ldap slapd netmount dns + after famd + after sshd +} + +checkconfig() { + if [ ! -f "${LIGHTTPD_CONF}" ] ; then + ewarn "${LIGHTTPD_CONF} does not exist." + return 1 + fi + + if [ -z "${LIGHTTPD_PID}" ] ; then + eerror "server.pid-file variable in ${LIGHTTPD_CONF}" + eerror "is not set. Please set this variable properly" + eerror "and try again" + return 1 + fi + /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null +} + +start() { + checkconfig || return 1 + # Glean lighttpd's credentials from the configuration file + # Fixes bug 454366 + LIGHTTPD_USER="$(awk '/^server.username/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" + LIGHTTPD_GROUP="$(awk '/^server.groupname/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" + checkpath -d -q -m 0750 -o "${LIGHTTPD_USER}":"${LIGHTTPD_GROUP}" /run/lighttpd/ + + ebegin "Starting lighttpd" + start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \ + --pidfile "${LIGHTTPD_PID}" -- -f "${LIGHTTPD_CONF}" + eend $? +} + +stop() { + local rv=0 + ebegin "Stopping lighttpd" + start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}" + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + + ebegin "Re-opening lighttpd log files" + start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \ + --signal HUP + eend $? +} + +graceful() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + + ebegin "Gracefully stopping lighttpd" + start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \ + --signal INT + if eend $? ; then + rm -f "${LIGHTTPD_PID}" + start + fi +} |