Дана 24/08/23 10:04PM, David Colburn написа: > Owner and Group are "www www" - is that correct?
No. On a clean install (using defaults for the OpenBSD port), /var/www/logs/error.log and /var/www/logs/access.log are owned by the user _lighttpd and group _lighttpd. That differs from the instructions at https://redmine.lighttpd.net/projects/lighttpd/wiki/TutorialConfiguration#A-real-daemon which use www:www. If you are using custom values for server.username and server.groupname, then the log files ownership should match that setting. For the default lighttpd privilege separation user _lighttpd and the matching group, # chown _lighttpd:_lighttpd /var/www/logs/*.log should fix accessing log files by lighttpd. You would also need to do this if you previously used some other HTTP server, which created the log files using different ownership. For example, by default httpd(8) has root:daemon as ownership for the log files, which are in the same directory /var/www/logs. As stated in the thread on the link you provided, the file system which holds /var/www/dev needs to be mounted without the "nodev" flag set. By default (using the default partitioning scheme in OpenBSD), /var is mounted with the "nodev" flag set. So, **if you are using the defaults,** you would need to execute: # sed -i.bak '/\/var/s/nodev,//' /etc/fstab # shutdown -r now After reboot, lighttpd should be able to start: # rcctl start lighttpd # rcctl check lighttpd lighttpd(ok) Дана 24/08/24 09:31AM, Stuart Henderson написа: > Seems the port docs, or perhaps defaults, could do with some > tweaks as there are definitely some things which are not obvious > (/dev/null and not mounting nodev) and are a bit hard to figure > out unless you know OpenBSD. The behavior/UX of lighttpd differs from the rest of the system, including httpd. It should work out of the box with sensible defaults. At least there should be some warning during install (or in the manpage) to modify /etc/fstab. Curiously, httpd(8) also chroots (by default to /var/www), but it doesn't need nodev on /var/www, nor creating a duplicate /dev under /var/www. That's what I meant by the necessity for the maintainer of lighttpd port to take a look at this. Looking at the source code though, I'm not sure if that is even possible. OpenBSD's httpd is simply better written, if lacking some of the features of lighttpd.