seb view tools/lighttpd.conf @ 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
children cc1f3876e673
line source
1 # /etc/lighttpd/lighttpd.conf: SliTaz LightTPD
2 #
3 # Web server configuration file.
4 #
6 # Root documents.
7 server.document-root = "/var/www/"
9 # Port, default for HTTP traffic is 80.
10 server.port = 80
12 # Server, user and group name.
13 server.username = "www"
14 server.groupname = "www"
16 # Server header.
17 # Be nice and keep it at lighttpd and SliTaz GNU/Linux.
18 server.tag = "lighttpd (SliTaz GNU/Linux)"
20 # Directory listings.
21 dir-listing.activate = "enable"
22 dir-listing.encoding = "iso8859-1"
24 # File to open by default.
25 #
26 index-file.names = ( "index.html","index.php", "index.cgi", "index.sh" )
28 # Log messages.
29 #
30 accesslog.filename = "/var/log/lighttpd/access.log"
31 server.errorlog = "/var/log/lighttpd/error.log"
33 # Server pid file
34 server.pid-file = "/var/run/lighttpd.pid"
36 # MIME type.
37 mimetype.assign = (
38 ".html" => "text/html",
39 ".txt" => "text/plain",
40 ".js" => "text/javascript",
41 ".css" => "text/css",
42 ".xml" => "text/xml",
43 ".diff" => "text/plain",
44 ".patch" => "text/plain",
45 ".list" => "text/plain",
46 ".log" => "text/plain",
47 ".conf" => "text/plain",
48 ".pdf" => "application/pdf",
49 ".ps" => "application/postscript",
50 ".jpg" => "image/jpeg",
51 ".jpeg" => "image/jpeg",
52 ".png" => "image/png",
53 ".gif" => "image/gif",
54 ".xbm" => "image/x-xbitmap",
55 ".xpm" => "image/x-xpixmap",
56 ".gz" => "application/x-gzip",
57 ".tar.gz" => "application/x-tgz",
58 ".torrent" => "application/x-bittorrent",
59 ".ogg" => "application/ogg",
60 ".cooklist" => "text/plain",
61 ".tazpkg" => "application/x-tazpkg",
62 ".sup" => "application/x-sup",
63 "README" => "text/plain",
64 "receipt" => "text/plain",
65 )
67 # Deny access the file-extensions.
68 url.access-deny = ( "~", ".inc" )
70 # Modules to load.
71 # See /usr/lib/lighttpd for all available modules.
72 # "mod_status", "mod_fastcgi", "mod_rewrite",
73 server.modules = (
74 "mod_access",
75 "mod_accesslog",
76 "mod_alias",
77 "mod_cgi",
78 "mod_userdir"
79 )
81 # User directory module.
82 userdir.path = "Public"
83 userdir.exclude-user = ("root")
85 # Status module.
86 #status.status-url = "/server-status"
88 # Compress module
89 #compress.cache-dir = "/var/cache/lighttpd/compress/"
90 #compress.filetype = ("text/plain", "text/html")
92 # CGI module. You can install Perl and assign .pl and .cgi script
93 # to /usr/bin/perl or Python: ".py" => "/usr/bin/python"
94 $HTTP["url"] =~ "/cgi-bin/" {
95 cgi.assign = (
96 ".sh" => "/bin/sh",
97 ".cgi" => "/bin/sh"
98 )
99 }
101 # Fast CGI modules for PHP.
102 #fastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )
103 #fastcgi.server = ( ".php" => ((
104 #"bin-path" => "/usr/bin/php-cgi",
105 #"socket" => "/tmp/php.socket"
106 #)))
108 # Alias urls for localhost (doc, examples and PHP info).
109 #
110 $HTTP["remoteip"] =~ "127.0.0.1" {
111 alias.url += (
112 "/doc/" => "/usr/share/doc/",
113 "/licenses/" => "/usr/share/licenses/"
114 )
115 }
117 #### Virtual hosts
118 #
119 # If you want name-based virtual hosting load mod_simple_vhost.
120 #
121 # You can directly put vhost in this file or use a sepate one for all
122 # virtual hosting.
123 #
124 #include "vhosts.conf"
126 # Example.org
127 #
128 #$HTTP["host"] =~ "(^|\.)example\.org$" {
129 #server.document-root = "/home/vhost/exemple.com/public"
130 #server.errorlog = "/home/vhost/exemple.com/error.log"
131 #accesslog.filename = "/home/vhost/exemple.com/access.log"
132 #}