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

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
Difficulty level Easy
Root privileges Yes
Requirements Shell
Est. reading time 1m
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
# 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/
/var/run/ is the standard location for the PID of the running lighttpd process, so enter:
# kill -HUP $(cat /var/run/

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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 2 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Ex-Opesa Dec 3, 2009 @ 0:04

    thanks, it saved my time :D

  • prasad Oct 21, 2016 @ 6:18

    hi ,

    I am using lighttpd with C CGI to do configuration and retrieve values in the system.
    For each cgi query i see a process is spawned till it returns success/failure to lighttpd. Is there a option in lighttpd.conf to limit the time lighttpd should wait fro this cgi process to return ?

    Thank you .

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum