lighttpd: lighttpd.conf vars, comments, guidance
lighttpd.conf variables, documentation comments, configuration guidance Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
parent
38ffa02e42
commit
c862b524fb
2 changed files with 35 additions and 26 deletions
|
@ -1,34 +1,41 @@
|
|||
server.document-root = "/www"
|
||||
### Documentation
|
||||
# https://wiki.lighttpd.net/
|
||||
#
|
||||
### Configuration Syntax
|
||||
# https://wiki.lighttpd.net/Docs_Configuration
|
||||
#
|
||||
### Configuration Options
|
||||
# https://wiki.lighttpd.net/Docs_ConfigurationOptions
|
||||
#
|
||||
### Configuration Variables (potentially used in /etc/lighttpd/conf.d/*.conf)
|
||||
var.log_root = "/var/log/lighttpd/"
|
||||
var.server_root = "/www/"
|
||||
var.state_dir = "/var/run/"
|
||||
var.home_dir = "/var/lib/lighttpd/"
|
||||
var.conf_dir = "/etc/lighttpd"
|
||||
var.vhosts_dir = server_root + "/vhosts"
|
||||
var.cache_dir = "/var/cache/lighttpd"
|
||||
var.socket_dir = home_dir + "/sockets"
|
||||
|
||||
### OpenWRT lighttpd base configuration
|
||||
server.document-root = server_root
|
||||
server.upload-dirs = ( "/tmp" )
|
||||
server.errorlog = "/var/log/lighttpd/error.log"
|
||||
server.pid-file = "/var/run/lighttpd.pid"
|
||||
server.errorlog = log_root + "error.log"
|
||||
server.pid-file = state_dir + "lighttpd.pid"
|
||||
server.username = "http"
|
||||
server.groupname = "www-data"
|
||||
|
||||
# historical; preserved for compatibility; should have been disabled by default
|
||||
index-file.names = ( "index.php", "index.html",
|
||||
"index.htm", "default.htm",
|
||||
)
|
||||
|
||||
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
|
||||
|
||||
### Features
|
||||
#https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_feature-flagsDetails
|
||||
server.feature-flags += ("server.graceful-shutdown-timeout" => 5)
|
||||
#server.feature-flags += ("server.graceful-restart-bg" => "enable")
|
||||
|
||||
### Options that are useful but not always necessary:
|
||||
#server.chroot = "/"
|
||||
#server.port = 81
|
||||
#server.bind = "localhost"
|
||||
#server.tag = "lighttpd"
|
||||
#server.errorlog-use-syslog = "enable"
|
||||
#server.network-backend = "writev"
|
||||
|
||||
### Use IPv6 if available
|
||||
#include_shell "/usr/share/lighttpd/use-ipv6.pl"
|
||||
|
||||
#dir-listing.encoding = "utf-8"
|
||||
#dir-listing.activate = "enable"
|
||||
|
||||
include "/etc/lighttpd/mime.conf"
|
||||
include "/etc/lighttpd/conf.d/*.conf"
|
||||
|
||||
### Customizations
|
||||
# customizations should generally be placed in separate files such as
|
||||
# /etc/lighttpd/conf.d/00_vars.conf # override variables for conf.d/*.conf
|
||||
# /etc/lighttpd/conf.d/zz_custom.conf # override other conf.d/*.conf settings
|
||||
|
|
|
@ -16,10 +16,12 @@ validate_conf() {
|
|||
|
||||
start_service() {
|
||||
user_exists http || user_add http
|
||||
[ -d /var/log/lighttpd ] || {
|
||||
mkdir -m 0775 -p /var/log/lighttpd
|
||||
chgrp www-data /var/log/lighttpd
|
||||
}
|
||||
for i in /var/log/lighttpd /var/lib/lighttpd /var/cache/lighttpd; do
|
||||
[ -d "$i" ] || {
|
||||
mkdir -m 0775 -p "$i"
|
||||
chgrp www-data "$i"
|
||||
}
|
||||
done
|
||||
|
||||
validate_conf || exit 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue