Lighttpd keeps restarting - macbook pro
Hey guys. I have a chess website and decided to attempt to lighten the load of my many ajax requests by using long polling and lighttpd. My hosting company has already said they'd be willing to install this on my VPS and I'm now just trying to set up lighttpd so that I can have a similar dev environment.
I'm on a mac (Snowleopard) and installed this using macports. Just looking at the directory setup, it appears that I'm running version 1.4.28_0. I got it working, well except that I can't process php files. Ok, so I have php and fastcgi installed and I wanted to restart lighttpd to see if my changes worked. This is where the weirdness starts.
Every time I stop the server (using kill -9 or killall), the process starts right back up. It appears there's a process owned by root that mentions "daemondo" that then starts up the man lighttpd start command. This appears to be by design. However, can anybody shed a little light on this? How do I fully stop the server for one. I see someone else had this same question about five months back
and it went unanswered. Thanks in advance for any help you can give.
RE: Lighttpd keeps restarting - macbook pro - Added by bigyellow9999 over 9 years ago
Ok, I'm still trying to understand this, but I got the server to stop with
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.lighttpd.plist
Launchctl seems to be a program that manages launchd, which, as of Mac OS X Tiger, is supposed to eventually replace init.d and rc.d. As I again am learning how this works, it might be better to read this yourself.
Bottom line, if you try and stop lighttpd like I did with a kill -9 or a killall and the process keeps coming back and the processes look similar to
user-5877:lighttpd 203412$ ps -aux | grep lighttpd
203412 17564 0.7 0.0 2435120 536 s000 S+ 5:01PM 0:00.00 grep lighttpd
root 65277 0.0 0.0 2437696 1820 s003 S+ 8:49AM 0:00.12 vi /opt/local/etc/lighttpd/lighttpd.conf
_www 2772 0.0 0.0 2437664 1448 ?? S 3:04PM 0:00.47 /opt/local/sbin/lighttpd -D -f /opt/local/etc/lighttpd/lighttpd.conf
root 2771 0.0 0.0 2446912 1020 ?? Ss 3:04PM 0:00.04 /opt/local/bin/daemondo --label=lighttpd --start-cmd /opt/local/sbin/lighttpd -D -f /opt/local/etc/lighttpd/lighttpd.conf ; --pid=exec
try the launchctl command above and see how that works for you.