You are not logged in.
Hello!
I have been using Arch for a couple of years now and I love it. However, recently I made an upgrade (pacman -Syu) on one web server and I can't get the lighttpd server back to working state. If I start it with "/etc/rc.d/lighttpd start" it looks like everything is ok. Even "/etc/rc.d/lighttpd status" returns that it is [STARTED] , but when I try to stop it, it returns FAIL. I assume that something is preventing the lighttpd to start, but there is nothing in the lighttpd log, neither in error.log. I have also tried to reinstall all the packages, but with no difference.I have to fix it, but I don't know where to start. Thank you for any hints you may provide.
Best regards!
Jernej
Offline
here's how i debug daemons:
1. take a look at /etc/rc.d/<daemon> directly in some text editor
2. work out what executable it uses under the start case
3. man or --help that executable and try to find the --debug or --verbose flag*
4. try that command (as root) directly from the commandline
5. profit
*also note if there's any --nodaemon or --foreground flag you could use while testing (useful for mpd)
//github/
Offline
Here's the content of /etc/rc.d/lighttpd I'm not that smart to figure out the name of the executable.
=====================================
#!/bin/bash
daemon_name=lighttpd
. /etc/rc.conf
. /etc/rc.d/functions
get_pid() {
pidof -o %PPID $daemon_name
}
case "$1" in
start)
stat_busy "Starting $daemon_name daemon"
PID=$(get_pid)
if [ -z "$PID" ]; then
[ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
# RUN
$daemon_name -f /etc/lighttpd/lighttpd.conf
#
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
echo $(get_pid) > /var/run/$daemon_name.pid
add_daemon $daemon_name
stat_done
fi
else
stat_fail
exit 1
fi
;;
stop)
stat_busy "Stopping $daemon_name daemon"
PID=$(get_pid)
# KILL
[ ! -z "$PID" ] && kill $PID &> /dev/null
#
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm -f /var/run/$daemon_name.pid &> /dev/null
rm_daemon $daemon_name
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
status)
stat_busy "Checking $daemon_name status";
ck_status $daemon_name
;;
*)
echo "usage: $0 {start|stop|restart|status}"
esac
exit 0
=====================================
Offline
please use [ code ] tags ![]()
# snip
daemon_name=lighttpd
# snip
case "$1" in
start)
stat_busy "Starting $daemon_name daemon"
# snip
# RUN
$daemon_name -f /etc/lighttpd/lighttpd.conf
# snipso, step 3...
Last edited by brisbin33 (2010-06-01 19:11:02)
//github/
Offline
Thank you Brisbin! I'm moving forward
I found out that the server.username and server.groupname in lighttpd.conf was set to "http", but my installation was using "lighttpd" user (and all the web files were owned by that user). So I changed it to "lighttpd" and restarted the server and voila - It works. Almost
It can serve the static content, but as soon as I try to run a php scipt I get the 403 - Forbidden. I doublechecked folder and file permissions (of the script). So I assume php is running with the wrong user now? Where to set that?
Thank you for help!
j.
Offline
if i had to guess, you've got something else incorrect either with file/folder perms (i know you checked but...) or in lighthttpd.conf. the only other place is /etc/php/php.ini, but i just skimmed mine and didn't see anything about what user to run as. i use apache and it seems php inherits its user from the webserver running it.
//github/
Offline
I guess you are right again. I probably messed up my configuration when trying to reinstall php fcgi... will have to dig some more.
If anyone has something to add I would appreciate it. Will post the solution when I resolve the error. Thanks again Brisbin!
Offline
I made a system upgrade again and got to this:
[root@Archlinux pacman.d]# pacman -S fcgi php eaccelerator
Illegal instruction
[root@Archlinux pacman.d]# pacman -S fcgi php eaccelerator
Illegal instruction
[root@Archlinux pacman.d]# pacman -Sy
Illegal instruction
[root@Archlinux pacman.d]# reboot
Illegal instruction
[root@Archlinux pacman.d]# shutdown -r now
Illegal instructionI called my brother on the remote site, to reset the server, but now I can't reach it with ssh. I'll drive there tomorrow.
Last edited by jernej (2010-06-01 22:13:38)
Offline