Browse Source

lighttpd: create user http and run as http by default

Signed-off-by: W. Michael Petullo <mike@flyn.org>
lilik-openwrt-22.03
W. Michael Petullo 10 years ago
parent
commit
a0885f117e
2 changed files with 7 additions and 3 deletions
  1. +2
    -2
      net/lighttpd/files/lighttpd.conf
  2. +5
    -1
      net/lighttpd/files/lighttpd.init

+ 2
- 2
net/lighttpd/files/lighttpd.conf View File

@ -13,8 +13,8 @@ server.document-root = "/www"
server.upload-dirs = ( "/tmp" ) server.upload-dirs = ( "/tmp" )
server.errorlog = "/var/log/lighttpd/error.log" server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid" 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.tag = "lighttpd"
#server.errorlog-use-syslog = "enable" #server.errorlog-use-syslog = "enable"
#server.network-backend = "write" #server.network-backend = "write"


+ 5
- 1
net/lighttpd/files/lighttpd.init View File

@ -6,7 +6,11 @@ SERVICE_USE_PID=1
START=50 START=50
start() { 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 service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
} }


Loading…
Cancel
Save