lighttpd: switch webroot to /srv/www/lighttpd; user to _lighttpd; create dirs in service.

This commit is contained in:
Juan RP 2016-05-01 10:37:44 +02:00
parent 3a0c20df1f
commit d5fcf6071a
3 changed files with 20 additions and 9 deletions

View file

@ -3,9 +3,9 @@
# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions
server.port = 80
server.username = "httpd"
server.groupname = "httpd"
server.document-root = "/srv/httpd"
server.username = "_lighttpd"
server.groupname = "_lighttpd"
server.document-root = "/srv/www/lighttpd"
server.errorlog = "/var/log/lighttpd/error.log"
dir-listing.activate = "enable"
index-file.names = ( "index.html" )

View file

@ -1,2 +1,16 @@
#!/bin/sh
[ -s conf ] && . ./conf
: ${ROOTDIR:=/srv/www/lighttpd}
: ${LOGDIR:=/var/log/lighttpd}
if [ ! -d $ROOTDIR ]; then
mkdir -p $ROOTDIR
chown _lighttpd:_lighttpd $ROOTDIR
fi
if [ ! -d $LOGDIR ]; then
mkdir -p $LOGDIR
chown _lighttpd:_lighttpd $LOGDIR
fi
exec lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf

View file

@ -1,15 +1,12 @@
# Template file for 'lighttpd'
pkgname=lighttpd
version=1.4.39
revision=3
revision=4
makedepends="libmysqlclient-devel lua-devel libxml2-devel sqlite-devel gdbm-devel pcre-devel libressl-devel fcgi-devel"
hostmakedepends="automake pkg-config pcre-devel libtool"
conf_files="/etc/lighttpd/lighttpd.conf"
system_accounts="httpd"
lighttpd_homedir="/src/httpd"
make_dirs="
/srv/www 0755 root root
/var/log/lighttpd 0750 httpd httpd"
system_accounts="_${pkgname}"
_lighttpd_homedir="/srv/www/${pkgname}"
short_desc="A secure, fast, compliant and very flexible web-server"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="2-clause-BSD"