lighttpd: create user http and run as http by default
Signed-off-by: W. Michael Petullo <mike@flyn.org>
This commit is contained in:
parent
4ec9d99303
commit
a0885f117e
|
@ -13,8 +13,8 @@ server.document-root = "/www"
|
|||
server.upload-dirs = ( "/tmp" )
|
||||
server.errorlog = "/var/log/lighttpd/error.log"
|
||||
server.pid-file = "/var/run/lighttpd.pid"
|
||||
#server.username = "www-data"
|
||||
#server.groupname = "www-data"
|
||||
server.username = "http"
|
||||
server.groupname = "www-data"
|
||||
#server.tag = "lighttpd"
|
||||
#server.errorlog-use-syslog = "enable"
|
||||
#server.network-backend = "write"
|
||||
|
|
|
@ -6,7 +6,11 @@ SERVICE_USE_PID=1
|
|||
START=50
|
||||
|
||||
start() {
|
||||
mkdir -m 0755 -p /var/log/lighttpd
|
||||
user_exists http || user_add http
|
||||
[ -d /var/log/lighttpd ] || {
|
||||
mkdir -m 0775 -p /var/log/lighttpd
|
||||
chgrp www-data /var/log/lighttpd
|
||||
}
|
||||
service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue