diff options
author | W. Michael Petullo <mike@flyn.org> | 2014-09-21 17:33:47 -0400 |
---|---|---|
committer | W. Michael Petullo <mike@flyn.org> | 2014-09-21 17:33:47 -0400 |
commit | a0885f117ef945787b0d0572572d8798fdcb3268 (patch) | |
tree | 7de3a2700dec0e777f651d1dd8588ec97728ea54 /net/lighttpd/files | |
parent | 4ec9d993038c8f97b128017cac5d268083054b48 (diff) |
lighttpd: create user http and run as http by default
Signed-off-by: W. Michael Petullo <mike@flyn.org>
Diffstat (limited to 'net/lighttpd/files')
-rw-r--r-- | net/lighttpd/files/lighttpd.conf | 4 | ||||
-rw-r--r-- | net/lighttpd/files/lighttpd.init | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/net/lighttpd/files/lighttpd.conf b/net/lighttpd/files/lighttpd.conf index 378e32ae1..a52d08f6d 100644 --- a/net/lighttpd/files/lighttpd.conf +++ b/net/lighttpd/files/lighttpd.conf @@ -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" diff --git a/net/lighttpd/files/lighttpd.init b/net/lighttpd/files/lighttpd.init index d73a5da98..936c7f6c7 100644 --- a/net/lighttpd/files/lighttpd.init +++ b/net/lighttpd/files/lighttpd.init @@ -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 } |