Start / Stop / Restart Lighttpd Web Server on Linux / Unix

by on March 13, 2008 · 1 comment· LAST UPDATED November 2, 2013

in , ,

I'm unable to find any command(s) to stop lighttpd web server. How do I stop / start / restart Lighttpd on Debian/Ubuntu Linux installed using apt-get command? How do I restart lighttpd on RHEL / CentOS installed using yum command? How do I restart lighttpd on FreeBSD Unix operating systems?

You can use the following commands to control Lighttpd web server.

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
RequirementsShell
Estimated completion time1m
a] /etc/init.d/lighttpd A sys v style script On Linux distro to start / stop / restart lighttpd web server.

b] kill command.

c] pkill command.

d] killall command.

To stop lighttpd:

Just type the following command to stop lighttpd:
# /etc/init.d/lighttpd stop

To start lighttpd:

Just type the following command to stop lighttpd:
# /etc/init.d/lighttpd start

To restart lighttpd:

Just type the following command to restart lighttpd:
# /etc/init.d/lighttpd restart

Debian / Ubuntu Linux start lighttpd

# /etc/init.d/lighttpd start

Debian / Ubuntu Linux stop lighttpd

# /etc/init.d/lighttpd stop

Debian / Ubuntu Linux rstart lighttpd

# /etc/init.d/lighttpd restart

FreeBSD sart lighttpd

# /usr/local/etc/rc.d/lighttpd start

FreeBSD stop lighttpd

# /usr/local/etc/rc.d/lighttpd stop

FreeBSD restart lighttpd

# /usr/local/etc/rc.d/lighttpd restart

pkill/kill/killall command examples

Alert: The following commands needs root level access and need good understanding of command line options

Kill lighttpd

If you don't have sys v style init script, type the following command to kill lighttpd on Linux operating systems:
# killall lighttpd
OR
# pkill -KILL -u lighttpdUserNameHere lighttpd

Reload lighttpd

To reload lighttpd when you do not have sys v style init script, enter:
# kill -HUP $(cat /path/to/lighttpd.pid-file)
/var/run/lighttpd.pid is the standard location for the PID of the running lighttpd process, so enter:
# kill -HUP $(cat /var/run/lighttpd.pid)

Start lighttpd

To start lighttpd when you do not have sys v style init script, enter:
# /sbin/lighttpd -f /path/to/lighttpd.conf

Restart lighttpd

Type the following two commands to restart lighttpd when you do not have sys v style init script:
# pkill -KILL -u lighttpdUserNameHere lighttpd
# /sbin/lighttpd -f /path/to/lighttpd.conf

See lighttpd command man page for more information.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Ex-Opesa December 3, 2009 at 12:04 am

thanks, it saved my time :D

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: