diff options
author | Pierre Habouzit <madcoder@debian.org> | 2008-04-13 10:46:42 +0000 |
---|---|---|
committer | Pierre Habouzit <madcoder@debian.org> | 2008-04-13 10:46:42 +0000 |
commit | 94100ea998d47461a7e1976f671d80ba3c425299 (patch) | |
tree | bc5464f86fca6102ce2b36ff7b806d163fdd5d7f | |
parent | b4545c41a395713aa3cdfca32978f837dffcaf8d (diff) | |
download | lighttpd-94100ea998d47461a7e1976f671d80ba3c425299.tar.gz |
Add handling of /var/cache/lighttpd/uploads (Closes: 408521)
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/lighttpd.conf | 21 | ||||
-rw-r--r-- | debian/lighttpd.cron.daily | 9 | ||||
-rw-r--r-- | debian/lighttpd.dirs | 1 |
4 files changed, 25 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog index 45ce8a7..3b21362 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,11 @@ lighttpd (1.4.19-2) UNRELEASED; urgency=low spurious errors for uninstalled and not purged lighttpd's (Closes: 472175). + * Add handling of /var/cache/lighttpd/uploads (Closes: 408521): + + add it in lighttpd.dirs. + + add it as a server.upload-dirs in lighttpd.conf. + + purge it daily in lighttpd.cron.daily. + -- Pierre Habouzit <madcoder@debian.org> Thu, 20 Mar 2008 00:53:45 +0100 lighttpd (1.4.19-1~bpo40+1) etch-backports; urgency=low diff --git a/debian/lighttpd.conf b/debian/lighttpd.conf index 02c5fe9..f33882f 100644 --- a/debian/lighttpd.conf +++ b/debian/lighttpd.conf @@ -1,5 +1,5 @@ # Debian lighttpd configuration file -# +# ############ Options you really have to take care of #################### @@ -9,13 +9,13 @@ # - saves some time # - saves memory -server.modules = ( +server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", -# "mod_rewrite", -# "mod_redirect", +# "mod_rewrite", +# "mod_redirect", # "mod_evhost", # "mod_usertrack", # "mod_rrdtool", @@ -23,12 +23,15 @@ server.modules = ( # "mod_expire", # "mod_flv_streaming", # "mod_evasive" - ) +) -## a static document-root, for virtual-hosting take look at the +## a static document-root, for virtual-hosting take look at the ## server.virtual-* options server.document-root = "/var/www/" +## where to upload files to, purged daily. +server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) + ## where to send error-messages to server.errorlog = "/var/log/lighttpd/error.log" @@ -57,7 +60,7 @@ url.access-deny = ( "~", ".inc" ) # .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 ####### ## Use ipv6 @@ -76,7 +79,7 @@ server.use-ipv6 = "enable" ## to help the rc.scripts server.pid-file = "/var/run/lighttpd.pid" -## +## ## Format: <errorfile-prefix><status>.html ## -> ..../status-404.html for 'File not found' #server.errorfile-prefix = "/var/www/" @@ -144,7 +147,7 @@ compress.filetype = ("text/plain", "text/html", "application/x-javascr ## mimetype mapping include_shell "/usr/share/lighttpd/create-mime.assign.pl" -## load enabled configuration files, +## load enabled configuration files, ## read /etc/lighttpd/conf-available/README first include_shell "/usr/share/lighttpd/include-conf-enabled.pl" diff --git a/debian/lighttpd.cron.daily b/debian/lighttpd.cron.daily index 222532a..5888e18 100644 --- a/debian/lighttpd.cron.daily +++ b/debian/lighttpd.cron.daily @@ -1,5 +1,10 @@ #!/bin/sh # Cleanup lighttpd compress cache -if test -d /var/cache/lighttpd/compress; then - su -s /bin/sh -c "find /var/cache/lighttpd/compress -type f -atime +30 -print0 | xargs -0 -r rm" www-data + +cache=/var/cache/lighttpd +if test -d "$cache/compress"; then + su -s /bin/sh -c "find $cache/compress -type f -atime +30 -print0 | xargs -0 -r rm" www-data +fi +if test -d "$cache/uploads"; then + su -s /bin/sh -c "find $cache/uploads -type f -atime +1 -print0 | xargs -0 -r rm" www-data fi diff --git a/debian/lighttpd.dirs b/debian/lighttpd.dirs index b3281a7..6792a8a 100644 --- a/debian/lighttpd.dirs +++ b/debian/lighttpd.dirs @@ -1,6 +1,7 @@ var/www var/log/lighttpd var/cache/lighttpd/compress +var/cache/lighttpd/uploads etc/lighttpd/conf-available etc/lighttpd/conf-enabled usr/sbin |