seb rev 19
Add lighty custom config file and imprive pkg
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Mar 07 11:36:16 2017 +0100 (2017-03-07) |
parents | ff5c597e5d11 |
children | cc1f3876e673 |
files | packages/lighttpd seb tools/lighttpd.conf |
line diff
1.1 --- a/packages/lighttpd Tue Mar 07 10:51:02 2017 +0100 1.2 +++ b/packages/lighttpd Tue Mar 07 11:36:16 2017 +0100 1.3 @@ -5,11 +5,19 @@ 1.4 1.5 seb_install() { 1.6 install_files "/usr/sbin/lighttpd" "/usr/lib/libpcre.so*" 1.7 - mkdir -p ${rootfs}/etc/lighttpd 1.8 1.9 # Configs 1.10 - cp -f /etc/lighttpd/lighttpd.conf ${rootfs}/etc/lighttpd 1.11 - cp -f /etc/lighttpd/vhosts.conf ${rootfs}/etc/lighttpd 1.12 + mkdir -p ${rootfs}/etc/lighttpd 1.13 + cp -f ${tools}/lighttpd.conf ${rootfs}/etc/lighttpd 1.14 + 1.15 + # Default modules 1.16 + install_files \ 1.17 + "/usr/lib/lighttpd/mod_access*" \ 1.18 + "/usr/lib/lighttpd/mod_alias.so" \ 1.19 + "/usr/lib/lighttpd/mod_cgi.so" \ 1.20 + "/usr/lib/lighttpd/mod_dirlisting.so" \ 1.21 + "/usr/lib/lighttpd/mod_indexfile.so" \ 1.22 + "/usr/lib/lighttpd/mod_userdir.so" 1.23 1.24 # Daemon start function 1.25 cat > ${rootfs}/etc/daemons/lighttpd << EOT
2.1 --- a/seb Tue Mar 07 10:51:02 2017 +0100 2.2 +++ b/seb Tue Mar 07 11:36:16 2017 +0100 2.3 @@ -116,8 +116,11 @@ 2.4 install_files() { 2.5 for file in ${@} ; do 2.6 path=$(dirname $file) 2.7 + if [ ! -d "${rootfs}${path}" ]; then 2.8 + mkdir -p ${rootfs}${path} 2.9 + fi 2.10 echo -n "Installing: $file" 2.11 - cp -a ${file} ${rootfs}${path} && check 2.12 + cp -a ${file} ${rootfs}${path}; check 2.13 done 2.14 } 2.15
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tools/lighttpd.conf Tue Mar 07 11:36:16 2017 +0100 3.3 @@ -0,0 +1,132 @@ 3.4 +# /etc/lighttpd/lighttpd.conf: SliTaz LightTPD 3.5 +# 3.6 +# Web server configuration file. 3.7 +# 3.8 + 3.9 +# Root documents. 3.10 +server.document-root = "/var/www/" 3.11 + 3.12 +# Port, default for HTTP traffic is 80. 3.13 +server.port = 80 3.14 + 3.15 +# Server, user and group name. 3.16 +server.username = "www" 3.17 +server.groupname = "www" 3.18 + 3.19 +# Server header. 3.20 +# Be nice and keep it at lighttpd and SliTaz GNU/Linux. 3.21 +server.tag = "lighttpd (SliTaz GNU/Linux)" 3.22 + 3.23 +# Directory listings. 3.24 +dir-listing.activate = "enable" 3.25 +dir-listing.encoding = "iso8859-1" 3.26 + 3.27 +# File to open by default. 3.28 +# 3.29 +index-file.names = ( "index.html","index.php", "index.cgi", "index.sh" ) 3.30 + 3.31 +# Log messages. 3.32 +# 3.33 +accesslog.filename = "/var/log/lighttpd/access.log" 3.34 +server.errorlog = "/var/log/lighttpd/error.log" 3.35 + 3.36 +# Server pid file 3.37 +server.pid-file = "/var/run/lighttpd.pid" 3.38 + 3.39 +# MIME type. 3.40 +mimetype.assign = ( 3.41 + ".html" => "text/html", 3.42 + ".txt" => "text/plain", 3.43 + ".js" => "text/javascript", 3.44 + ".css" => "text/css", 3.45 + ".xml" => "text/xml", 3.46 + ".diff" => "text/plain", 3.47 + ".patch" => "text/plain", 3.48 + ".list" => "text/plain", 3.49 + ".log" => "text/plain", 3.50 + ".conf" => "text/plain", 3.51 + ".pdf" => "application/pdf", 3.52 + ".ps" => "application/postscript", 3.53 + ".jpg" => "image/jpeg", 3.54 + ".jpeg" => "image/jpeg", 3.55 + ".png" => "image/png", 3.56 + ".gif" => "image/gif", 3.57 + ".xbm" => "image/x-xbitmap", 3.58 + ".xpm" => "image/x-xpixmap", 3.59 + ".gz" => "application/x-gzip", 3.60 + ".tar.gz" => "application/x-tgz", 3.61 + ".torrent" => "application/x-bittorrent", 3.62 + ".ogg" => "application/ogg", 3.63 + ".cooklist" => "text/plain", 3.64 + ".tazpkg" => "application/x-tazpkg", 3.65 + ".sup" => "application/x-sup", 3.66 + "README" => "text/plain", 3.67 + "receipt" => "text/plain", 3.68 +) 3.69 + 3.70 +# Deny access the file-extensions. 3.71 +url.access-deny = ( "~", ".inc" ) 3.72 + 3.73 +# Modules to load. 3.74 +# See /usr/lib/lighttpd for all available modules. 3.75 +# "mod_status", "mod_fastcgi", "mod_rewrite", 3.76 +server.modules = ( 3.77 + "mod_access", 3.78 + "mod_accesslog", 3.79 + "mod_alias", 3.80 + "mod_cgi", 3.81 + "mod_userdir" 3.82 +) 3.83 + 3.84 +# User directory module. 3.85 +userdir.path = "Public" 3.86 +userdir.exclude-user = ("root") 3.87 + 3.88 +# Status module. 3.89 +#status.status-url = "/server-status" 3.90 + 3.91 +# Compress module 3.92 +#compress.cache-dir = "/var/cache/lighttpd/compress/" 3.93 +#compress.filetype = ("text/plain", "text/html") 3.94 + 3.95 +# CGI module. You can install Perl and assign .pl and .cgi script 3.96 +# to /usr/bin/perl or Python: ".py" => "/usr/bin/python" 3.97 +$HTTP["url"] =~ "/cgi-bin/" { 3.98 + cgi.assign = ( 3.99 + ".sh" => "/bin/sh", 3.100 + ".cgi" => "/bin/sh" 3.101 + ) 3.102 +} 3.103 + 3.104 +# Fast CGI modules for PHP. 3.105 +#fastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" ) 3.106 +#fastcgi.server = ( ".php" => (( 3.107 + #"bin-path" => "/usr/bin/php-cgi", 3.108 + #"socket" => "/tmp/php.socket" 3.109 + #))) 3.110 + 3.111 +# Alias urls for localhost (doc, examples and PHP info). 3.112 +# 3.113 +$HTTP["remoteip"] =~ "127.0.0.1" { 3.114 + alias.url += ( 3.115 + "/doc/" => "/usr/share/doc/", 3.116 + "/licenses/" => "/usr/share/licenses/" 3.117 + ) 3.118 +} 3.119 + 3.120 +#### Virtual hosts 3.121 +# 3.122 +# If you want name-based virtual hosting load mod_simple_vhost. 3.123 +# 3.124 +# You can directly put vhost in this file or use a sepate one for all 3.125 +# virtual hosting. 3.126 +# 3.127 +#include "vhosts.conf" 3.128 + 3.129 +# Example.org 3.130 +# 3.131 +#$HTTP["host"] =~ "(^|\.)example\.org$" { 3.132 + #server.document-root = "/home/vhost/exemple.com/public" 3.133 + #server.errorlog = "/home/vhost/exemple.com/error.log" 3.134 + #accesslog.filename = "/home/vhost/exemple.com/access.log" 3.135 +#}