0

We're running lighttpd-1.4.26 on FreeBSD 7.2-RELEASE. Each time we rebooted the machine, and the lighttpd was started by rc script, the pid file won't automatically write into /var/run/lighttpd.pid. Howerver, if we start the lighttpd manually by running /usr/local/etc/rc.d/lighttpd start, the pid file will be fine.

Does any know how to solve this problem?

  • Is the user the RC script runs as the same as the user you use when you start it manually? Also, do you set server.username and server.groupname in your conf? – David Souther May 14 '12 at 19:49

1 Answers1

0

When you say "the lighttpd was started by rc script", are you referring to the /usr/local/etc/rc.d/lighttpd, or some other script?

Because you really should be using the same script -- indeed, the /usr/local/etc/rc.d/lighttpd will start it for you at boot, if lighthttpd_enable is set in you rc.conf -- but your wording makes me think, you use a different script at boot. It may even be, you edited /etc/rc for the purpose (a big no-no).

Mikhail T.
  • 3,043
  • 3
  • 29
  • 46